@matheusbsbs / matheus-bagliano / commits / 3df0a859aa
Fork 0

rebase -i: actually show the diffstat when being verbose

The "while" loop in the function do_rest is not supposed to ever be exited. Instead, the function do_one checks if there is nothing left, and cleans up and exits if that is the case. So the diffstat code belongs there. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jul 8, 2007 at 03:02 UTC 3df0a859aa5cc68a2bd616cb686f01cf0e2468c1
1 file changed +4 -4
git-rebase--interactive.sh
+4 -4
@@ -239,7 +239,10 @@ do_next () {
239 fi &&
240 message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO)" &&
241 git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
242 - git symbolic-ref HEAD $HEADNAME &&
242 + git symbolic-ref HEAD $HEADNAME && {
243 + test ! -f "$DOTEST"/verbose ||
244 + git diff --stat $(cat "$DOTEST"/head)..HEAD
245 + } &&
246 rm -rf "$DOTEST" &&
247 warn "Successfully rebased and updated $HEADNAME."
248
@@ -251,9 +254,6 @@ do_rest () {
254 do
255 do_next
256 done
254 - test -f "$DOTEST"/verbose &&
255 - git diff --stat $(cat "$DOTEST"/head)..HEAD
256 - exit
257 }
258
259 while case $# in 0) break ;; esac