Skip to content

Commit

Permalink
rebase -i: Fix numbers in progress report
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Sep 26, 2007
1 parent 376ccb8 commit dad4e32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-rebase--interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit dad4e32

Please sign in to comment.