rebase -i: support --stat
Move up the code that displays the diffstat if '--stat' is passed, so that it will be executed before calling git-rebase--interactive.sh. A side effect is that the diffstat is now displayed before "First, rewinding head to replay your work on top of it...". Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin von Zweigbergk committed
Feb 6, 2011 at 13:43 UTC
f4107d9cdce49177a056353a162d82555595850e
1 file changed
+7
-7
git-rebase.sh
+7
-7
@@ -539,13 +539,6 @@ fi
539
# If a hook exists, give it a chance to interrupt
540
run_pre_rebase_hook "$upstream_arg" "$@"
541
542
-test "$type" = interactive && run_interactive_rebase
543
-
544
-# Detach HEAD and reset the tree
545
-say "First, rewinding head to replay your work on top of it..."
546
-git checkout -q "$onto^0" || die "could not detach HEAD"
547
-git update-ref ORIG_HEAD $branch
548
-
542
if test -n "$diffstat"
543
then
544
if test -n "$verbose"
@@ -556,6 +549,13 @@ then
549
GIT_PAGER='' git diff --stat --summary "$mb" "$onto"
550
fi
551
552
+test "$type" = interactive && run_interactive_rebase
553
+
554
+# Detach HEAD and reset the tree
555
+say "First, rewinding head to replay your work on top of it..."
556
+git checkout -q "$onto^0" || die "could not detach HEAD"
557
+git update-ref ORIG_HEAD $branch
558
+
559
# If the $onto is a proper descendant of the tip of the branch, then
560
# we just fast-forwarded.
561
if test "$mb" = "$branch"