diff options
author | Eric Sunshine <sunshine@sunshineco.com> | 2015-03-04 02:53:04 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-06 12:11:27 -0800 |
commit | 28c8cfc3635368f06f6deaedb5e90da328df27d2 (patch) | |
tree | 60e882a9e813065bec2c2fe7ecb50367cb2f0a35 /t/t3404-rebase-interactive.sh | |
parent | Show number of TODO items for interactive rebase (diff) | |
download | tgif-28c8cfc3635368f06f6deaedb5e90da328df27d2.tar.xz |
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 't/t3404-rebase-interactive.sh')
-rwxr-xr-x | t/t3404-rebase-interactive.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index 8197ed29a9..5dc2caf3c5 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1039,4 +1039,13 @@ test_expect_success 'short SHA-1 collide' ' ) ' +test_expect_success 'todo count' ' + write_script dump-raw.sh <<-\EOF && + cat "$1" + EOF + test_set_editor "$(pwd)/dump-raw.sh" && + git rebase -i HEAD~4 >actual && + grep "^# Rebase ..* onto ..* ([0-9]" actual +' + test_done |