From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: git@vger.kernel.org, gitster@pobox.com
Subject: [PATCH 3/5] rebase -i: Fix numbers in progress report
Date: Tue, 25 Sep 2007 16:43:04 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0709251642560.28395@racer.site> (raw)
In-Reply-To: <Pine.LNX.4.64.0709251640360.28395@racer.site>
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>
---
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 c850411..4f46a15 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
}
--
1.5.3.2.1057.gf4dc1
next prev parent reply other threads:[~2007-09-25 15:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-25 15:42 [PATCH 0/5] Two real fixes, two minor fixes, and a style fix Johannes Schindelin
2007-09-25 15:42 ` [PATCH 1/5] rebase -i: commit when continuing after "edit" Johannes Schindelin
2007-09-25 15:42 ` [PATCH 2/5] rebase -i: style fixes and minor cleanups Johannes Schindelin
2007-09-25 15:43 ` Johannes Schindelin [this message]
2007-09-25 15:43 ` [PATCH 4/5] rebase -i: work on a detached HEAD Johannes Schindelin
2007-09-25 15:43 ` [PATCH 5/5] rebase -i: avoid exporting GIT_AUTHOR_* variables Johannes Schindelin
2007-09-26 10:33 ` Johannes Sixt
2007-09-26 10:51 ` Johannes Schindelin
[not found] ` <86zlz9smqr.fsf@lola.quinscape.zz>
2007-09-26 11:18 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0709251642560.28395@racer.site \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).