From: Junio C Hamano Date: Wed, 9 Jan 2013 00:11:51 +0000 (-0800) Subject: Meta/Reintegrate: try keeping the cut points with comments X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f02bf6b48bb5c2585ae73485f26d0e959a74e935;p=thirdparty%2Fgit.git Meta/Reintegrate: try keeping the cut points with comments Using empty commits on the throw-away trial integration branches, keep track of the "doneness" comments in the history, so that later run of "redo-*.sh -[ud]" can resurrect them. --- diff --git a/Reintegrate b/Reintegrate index 59cf994fc3..1fad661b6c 100755 --- a/Reintegrate +++ b/Reintegrate @@ -83,18 +83,25 @@ no) fi } - cut_seen=0 + mark_cut () { + test -z "$prev_cut" && return + git commit --allow-empty -m "$prev_cut" + prev_cut= + } + + cut_seen=0 prev_cut= 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 + continue ;# slurp the remainder and skip fi case "$branch" in '###') - echo >&2 "$branch" + echo >&2 "$branch $eh" + prev_cut="$branch $eh" continue ;; '#'* | '') continue ;; @@ -109,6 +116,8 @@ no) mb=$(git merge-base "$tip" "$save") test "$mb" = "$tip" && continue + mark_cut + EDITOR=: git merge $accept_rerere --edit "$branch" || accept_rerere || exit @@ -130,6 +139,9 @@ no) ;; pick" "*) echo >&2 "* $eh" + + mark_cut + git cherry-pick "$branch" || exit ;; *) echo >&2 "Eh? $branch $eh"; exit ;; esac @@ -175,7 +187,15 @@ show_merge () { } show_pick () { - merged="$(git rev-parse --verify "$commit") pick $msg" + case "$msg" in + "### "* | "###") + merged="$msg" + ;; + *) + merged="$(git rev-parse --verify "$commit") pick $msg" + ;; + esac + } generate () {