aboutsummaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-01-14 20:01:21 -0800
committerJunio C Hamano <gitster@pobox.com>2008-01-14 20:04:02 -0800
commit4e6738778b30a5063579ad4b4ba34e12547f0e7c (patch)
tree2f5347f3ccbc21127c52562be6f76f5b430e7558 /git-rebase--interactive.sh
parent471a5ce5dda5c4315fe0f1d5ad3c642fc1ff540c (diff)
downloadgit-4e6738778b30a5063579ad4b4ba34e12547f0e7c.tar.gz
git-4e6738778b30a5063579ad4b4ba34e12547f0e7c.tar.xz
Squelch bogus progress output from git-rebase--interactive
The command repeats "Rebasing (1/1)" many times even when there is only one task remaining, because mark_action_done() is called to skip comment and empty lines in the TODO file. This should fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-xgit-rebase--interactive.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index acdcc5417..402ff3782 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -73,14 +73,19 @@ comment_for_reflog () {
esac
}
+last_count=
mark_action_done () {
sed -e 1q < "$TODO" >> "$DONE"
sed -e 1d < "$TODO" >> "$TODO".new
mv -f "$TODO".new "$TODO"
count=$(($(grep -ve '^$' -e '^#' < "$DONE" | wc -l)))
total=$(($count+$(grep -ve '^$' -e '^#' < "$TODO" | wc -l)))
- printf "Rebasing (%d/%d)\r" $count $total
- test -z "$VERBOSE" || echo
+ if test "$last_count" != "$count"
+ then
+ last_count=$count
+ printf "Rebasing (%d/%d)\r" $count $total
+ test -z "$VERBOSE" || echo
+ fi
}
make_patch () {