Skip to content

Commit

Permalink
rebase -i: support --stat
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin von Zweigbergk authored and Junio C Hamano committed Feb 10, 2011
1 parent cc1453e commit f4107d9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions git-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down

0 comments on commit f4107d9

Please sign in to comment.