Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t1512: ignore whitespaces in wc -l output
author
Junio C Hamano
<gitster@pobox.com>
Wed, 11 Jul 2012 23:30:28 +0000
(16:30 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 11 Jul 2012 23:30:49 +0000
(16:30 -0700)
Some implementations of sed (e.g. MacOS X) have whitespaces in the
output of "wc -l" that reads from the standard input. Ignore these
whitespaces by not quoting the command substitution to be compared
with the constant "16".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1512-rev-parse-disambiguation.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
957d740
)
diff --git
a/t/t1512-rev-parse-disambiguation.sh
b/t/t1512-rev-parse-disambiguation.sh
index 3ed7558c1ecd074504c6a8699bd599033b1ba84d..1eb35143f8fb61a0925e41209ccd910f91eb0d84 100755
(executable)
--- a/
t/t1512-rev-parse-disambiguation.sh
+++ b/
t/t1512-rev-parse-disambiguation.sh
@@
-257,7
+257,7
@@
test_expect_success 'rev-parse --disambiguate' '
# commits created by commit-tree in earlier tests do not share
# the prefix.
git rev-parse --disambiguate=000000000 >actual &&
- test
"$(wc -l <actual)"
= 16 &&
+ test
$(wc -l <actual)
= 16 &&
test "$(sed -e "s/^\(.........\).*/\1/" actual | sort -u)" = 000000000
'