summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>2011-02-06 13:43:45 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-02-10 14:08:08 -0800
commitf4107d9cdce49177a056353a162d82555595850e (patch)
treeee913623e5238856b9b230cbfc1b3221a6f2ce8b
parentrebase: factor out call to pre-rebase hook (diff)
downloadtgif-f4107d9cdce49177a056353a162d82555595850e.tar.xz
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>
-rwxr-xr-xgit-rebase.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index 87d7fde95c..c8a7e4ea56 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -539,13 +539,6 @@ fi
# If a hook exists, give it a chance to interrupt
run_pre_rebase_hook "$upstream_arg" "$@"
-test "$type" = interactive && run_interactive_rebase
-
-# Detach HEAD and reset the tree
-say "First, rewinding head to replay your work on top of it..."
-git checkout -q "$onto^0" || die "could not detach HEAD"
-git update-ref ORIG_HEAD $branch
-
if test -n "$diffstat"
then
if test -n "$verbose"
@@ -556,6 +549,13 @@ then
GIT_PAGER='' git diff --stat --summary "$mb" "$onto"
fi
+test "$type" = interactive && run_interactive_rebase
+
+# Detach HEAD and reset the tree
+say "First, rewinding head to replay your work on top of it..."
+git checkout -q "$onto^0" || die "could not detach HEAD"
+git update-ref ORIG_HEAD $branch
+
# If the $onto is a proper descendant of the tip of the branch, then
# we just fast-forwarded.
if test "$mb" = "$branch"