Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2015-03-04 10:53:04 +0300
committerJunio C Hamano <gitster@pobox.com>2015-03-06 23:11:27 +0300
commit28c8cfc3635368f06f6deaedb5e90da328df27d2 (patch)
tree60e882a9e813065bec2c2fe7ecb50367cb2f0a35 /t
parent97f05f43dc73f2855eb4c6acd1ea49d6d6bc4bce (diff)
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')
-rwxr-xr-xt/t3404-rebase-interactive.sh9
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