summaryrefslogtreecommitdiff
path: root/Reintegrate
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-27 20:41:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-27 20:41:00 (GMT)
commit0768d27d1df4410cb16d148b56451a89623a9a83 (patch)
tree1dd33a5a4fc332b14ecb86091de1f614f22fe991 /Reintegrate
parent7c87d39f77068877acdcc189c9dd6f929e832796 (diff)
downloadgit-0768d27d1df4410cb16d148b56451a89623a9a83.zip
git-0768d27d1df4410cb16d148b56451a89623a9a83.tar.gz
git-0768d27d1df4410cb16d148b56451a89623a9a83.tar.bz2
Meta/Reintegrate: stop at a cut ### line
Diffstat (limited to 'Reintegrate')
-rwxr-xr-xReintegrate12
1 files changed, 11 insertions, 1 deletions
diff --git a/Reintegrate b/Reintegrate
index 997c4cd..98fb07d 100755
--- a/Reintegrate
+++ b/Reintegrate
@@ -1,11 +1,13 @@
#!/bin/sh
-accept_rerere="--rerere-autoupdate" generate=no update= diff= edit=
+accept_rerere="--rerere-autoupdate" generate=no update= diff= edit= stop_at_cut=
while case "$#,$1" in 0,*) break;; *,-*) ;; esac
do
case "$1" in
-n) accept_rerere= ;;
-e) edit=t ;;
+ -c) stop_at_cut=1 ;;
+ -c?*) stop_at_cut=${1#-c} ;;
-d) update=${2?"diff with what?"}
diff=yes
generate=yes
@@ -78,9 +80,17 @@ no)
fi
}
+ cut_seen=0
while read branch eh
do
+ case "$branch" in '###') cut_seen=$(( $cut_seen + 1 )) ;; esac
+ if test -n "$stop_at_cut" && test $stop_at_cut -le $cut_seen
+ then
+ continue
+ fi
+
case "$branch" in '#'* | '') continue ;; esac
+
case "$eh" in
"" | "#"*)
echo >&2 "* $branch"