From: Johannes Schindelin Date: Tue, 25 Sep 2007 15:43:04 +0000 (+0100) Subject: rebase -i: Fix numbers in progress report X-Git-Tag: v1.5.4-rc0~413 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dad4e32c4658f12a6eaa2decead5d77678911d95;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index cab5e93d6..efa83f613 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 }