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>
This commit is contained in:
Johannes Schindelin 2007-07-08 03:02:13 +01:00 коммит произвёл Junio C Hamano
Родитель 18640d991b
Коммит 3df0a859aa
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -239,7 +239,10 @@ do_next () {
fi && fi &&
message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO)" && message="$GIT_REFLOG_ACTION: $HEADNAME onto $SHORTONTO)" &&
git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD && git update-ref -m "$message" $HEADNAME $NEWHEAD $OLDHEAD &&
git symbolic-ref HEAD $HEADNAME && git symbolic-ref HEAD $HEADNAME && {
test ! -f "$DOTEST"/verbose ||
git diff --stat $(cat "$DOTEST"/head)..HEAD
} &&
rm -rf "$DOTEST" && rm -rf "$DOTEST" &&
warn "Successfully rebased and updated $HEADNAME." warn "Successfully rebased and updated $HEADNAME."
@ -251,9 +254,6 @@ do_rest () {
do do
do_next do_next
done done
test -f "$DOTEST"/verbose &&
git diff --stat $(cat "$DOTEST"/head)..HEAD
exit
} }
while case $# in 0) break ;; esac while case $# in 0) break ;; esac