Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
t1512: match the "other" object names
author
Junio C Hamano
<gitster@pobox.com>
Fri, 13 Jul 2012 19:43:43 +0000
(12:43 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 13 Jul 2012 19:43:43 +0000
(12:43 -0700)
The test creates 16 objects that share the same prefix, and two other
objects that do not. Tweak the test so that the other two share the
same prefix that is different from the one that is shared by the 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:
4c654f5
)
diff --git
a/t/t1512-rev-parse-disambiguation.sh
b/t/t1512-rev-parse-disambiguation.sh
index 1eb35143f8fb61a0925e41209ccd910f91eb0d84..6b3d797ceabad069aefd1337ffe366b86b523412 100755
(executable)
--- a/
t/t1512-rev-parse-disambiguation.sh
+++ b/
t/t1512-rev-parse-disambiguation.sh
@@
-98,7
+98,7
@@
test_expect_success 'disambiguate commit-ish' '
'
test_expect_success 'disambiguate commit' '
'
test_expect_success 'disambiguate commit' '
- commit=$(echo "
j9xqh
" | git commit-tree 0000000000cdc -p 000000000) &&
+ commit=$(echo "
hoaxj
" | git commit-tree 0000000000cdc -p 000000000) &&
test $(git rev-parse $commit^) = $(git rev-parse 0000000000e4f)
'
test $(git rev-parse $commit^) = $(git rev-parse 0000000000e4f)
'
@@
-254,8
+254,8
@@
test_expect_success 'ambiguous commit-ish' '
test_expect_success 'rev-parse --disambiguate' '
# The test creates 16 objects that share the prefix and two
test_expect_success 'rev-parse --disambiguate' '
# The test creates 16 objects that share the prefix and two
- # commits created by commit-tree in earlier tests
do not share
- #
the
prefix.
+ # commits created by commit-tree in earlier tests
share a
+ #
different
prefix.
git rev-parse --disambiguate=000000000 >actual &&
test $(wc -l <actual) = 16 &&
test "$(sed -e "s/^\(.........\).*/\1/" actual | sort -u)" = 000000000
git rev-parse --disambiguate=000000000 >actual &&
test $(wc -l <actual) = 16 &&
test "$(sed -e "s/^\(.........\).*/\1/" actual | sort -u)" = 000000000