summaryrefslogtreecommitdiff
path: root/git-rebase--interactive.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-03-04 07:53:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-06 20:11:27 (GMT)
commit28c8cfc3635368f06f6deaedb5e90da328df27d2 (patch)
tree60e882a9e813065bec2c2fe7ecb50367cb2f0a35 /git-rebase--interactive.sh
parent97f05f43dc73f2855eb4c6acd1ea49d6d6bc4bce (diff)
downloadgit-28c8cfc3635368f06f6deaedb5e90da328df27d2.zip
git-28c8cfc3635368f06f6deaedb5e90da328df27d2.tar.gz
git-28c8cfc3635368f06f6deaedb5e90da328df27d2.tar.bz2
rebase-interactive: suppress whitespace preceding item count
97f05f43 (Show number of TODO items for interactive rebase, 2014-12-10) taught rebase-interactive to compute an item count with 'wc -l' and display it in the instruction list comments: # Rebase 46640c6..5568fd5 onto 46640c6 (4 TODO item(s)) On Mac OS X, however, it renders as: # Rebase 46640c6..5568fd5 onto 46640c6 ( 4 TODO item(s)) since 'wc -l' indents its output with leading spaces. Fix this. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-rebase--interactive.sh')
-rw-r--r--git-rebase--interactive.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index c6a4629..07512e4 100644
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -1032,6 +1032,7 @@ test -n "$autosquash" && rearrange_squash "$todo"
test -n "$cmd" && add_exec_commands "$todo"
todocount=$(git stripspace --strip-comments <"$todo" | wc -l)
+todocount=${todocount##* }
cat >>"$todo" <<EOF