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.
This commit is contained in:
Junio C Hamano 2012-03-16 13:04:28 -07:00
parent 894e5064a5
commit 370023272c

View File

@ -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"