summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 471a5ce)
raw | patch | inline | side by side (parent: 471a5ce)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 15 Jan 2008 04:01:21 +0000 (20:01 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 15 Jan 2008 04:04:02 +0000 (20:04 -0800) |
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>
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>
git-rebase--interactive.sh | patch | blob | history |
index acdcc5417a45d1419c8316734e3b742123e5aad4..402ff3782c0aaa472a2013ff3a9bef44a6cd8550 100755 (executable)
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 () {