Meta/Reintegrate: allow each step to be optionally amended
This will let me run 'Meta/Reintegrate -e' and feed the selected branches while on 'master', i.e. the final graduation ceremony, and clean up the merge messages.
Junio C Hamano committed
Mar 16, 2012 at 13:04 UTC
370023272cdce6020e439e70879d90455d4cc75e
1 file changed
+5
-2
Reintegrate
+5
-2
index f56214fc43..997c4cd10e 100755
--- a/Reintegrate
+++ b/Reintegrate
@@ -1,10 +1,11 @@
#!/bin/sh
-accept_rerere="--rerere-autoupdate" generate=no update= diff=
+accept_rerere="--rerere-autoupdate" generate=no update= diff= edit=
while case "$#,$1" in 0,*) break;; *,-*) ;; esac
do
case "$1" in
-n) accept_rerere= ;;
+ -e) edit=t ;;
-d) update=${2?"diff with what?"}
diff=yes
generate=yes
@@ -66,7 +67,7 @@ annotate_merge () {
case "$generate" in
no)
accept_rerere () {
- if ! git write-tree 2>/dev/null
+ if ! git write-tree 2>/dev/null >/dev/null
then
git rerere remaining
return 1
@@ -94,6 +95,8 @@ no)
exit
annotate_merge "$branch" || exit
+ test -z "$edit" ||
+ git commit --amend || exit
this=$(git rev-parse --verify HEAD)
if test "$this" = "$save"