diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2008-07-26 18:37:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-27 14:14:01 -0700 |
commit | 2122f8b963d49a59762e121c2da571c2348dcce3 (patch) | |
tree | 1a147e9da6e34a121fe2187b2cdf47eaa4522cb9 /t | |
parent | 47c6ef1c8def9a20b4ff40825456b45f5e63b51f (diff) | |
download | git-2122f8b963d49a59762e121c2da571c2348dcce3.tar.gz git-2122f8b963d49a59762e121c2da571c2348dcce3.tar.xz |
rev-parse: Add support for the ^! and ^@ syntax
Those shorthands are explained in the rev-parse documentation but were not
actually supported by rev-parse itself.
gitk internally uses rev-parse to interpret its command line arguments, and
being able to use these "limit with parents" syntax is handy there.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t6101-rev-parse-parents.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh index efc831363..919552a2f 100755 --- a/t/t6101-rev-parse-parents.sh +++ b/t/t6101-rev-parse-parents.sh @@ -28,6 +28,8 @@ test_expect_success 'final^1^2 != final^1^1' "test $(git rev-parse final^1^2) != test_expect_success 'final^1^3 not valid' "if git rev-parse --verify final^1^3; then false; else :; fi" test_expect_success '--verify start2^1' 'test_must_fail git rev-parse --verify start2^1' test_expect_success '--verify start2^0' 'git rev-parse --verify start2^0' +test_expect_success 'final^1^@ = final^1^1 final^1^2' "test \"$(git rev-parse final^1^@)\" = \"$(git rev-parse final^1^1 final^1^2)\"" +test_expect_success 'final^1^! = final^1 ^final^1^1 ^final^1^2' "test \"$(git rev-parse final^1^\!)\" = \"$(git rev-parse final^1 ^final^1^1 ^final^1^2)\"" test_expect_success 'repack for next test' 'git repack -a -d' test_expect_success 'short SHA-1 works' ' |