From 957d74062c1f0e92368aeda335e27d2d61f584f6 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 3 Jul 2012 14:21:59 -0700 Subject: rev-parse --disambiguate= The new option allows you to feed an ambiguous prefix and enumerate all the objects that share it as a prefix of their object names. Signed-off-by: Junio C Hamano --- t/t1512-rev-parse-disambiguation.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't/t1512-rev-parse-disambiguation.sh') diff --git a/t/t1512-rev-parse-disambiguation.sh b/t/t1512-rev-parse-disambiguation.sh index 6de3cb0c92..3ed7558c1e 100755 --- a/t/t1512-rev-parse-disambiguation.sh +++ b/t/t1512-rev-parse-disambiguation.sh @@ -252,4 +252,13 @@ test_expect_success 'ambiguous commit-ish' ' test_must_fail git log 000000000... ' +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. + git rev-parse --disambiguate=000000000 >actual && + test "$(wc -l