diff options
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | 2007-09-25 16:43:04 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-09-25 17:46:54 -0700 |
commit | dad4e32c4658f12a6eaa2decead5d77678911d95 (patch) | |
tree | 199a6eaeeb595d6597c625a0bb5a3932d8ae982d /git-rebase--interactive.sh | |
parent | 376ccb8cbb453343998e734d8a1ce79f57a4e092 (diff) | |
download | git-dad4e32c4658f12a6eaa2decead5d77678911d95.tar.gz |
rebase -i: Fix numbers in progress report
Instead of counting all lines in done and todo, we now count the actions
before outputting "$Rebasing ($count/$total)".
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rwxr-xr-x | git-rebase--interactive.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index cab5e93d60..efa83f6134 100755 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -72,8 +72,8 @@ mark_action_done () { sed -e 1q < "$TODO" >> "$DONE" sed -e 1d < "$TODO" >> "$TODO".new mv -f "$TODO".new "$TODO" - count=$(($(wc -l < "$DONE"))) - total=$(($count+$(wc -l < "$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 } |