diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-20 12:27:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-20 12:27:18 -0700 |
commit | 638924fec2189f3f20ebf5d0ff4cc34ee551dd39 (patch) | |
tree | 3a7b24c2855c88f95885e5fc5f6bfd372d72097d /t | |
parent | Merge branch 'jx/branch-vv-always-compare-with-upstream' (diff) | |
parent | peel_onion: do not assume length of x_type globals (diff) | |
download | tgif-638924fec2189f3f20ebf5d0ff4cc34ee551dd39.tar.xz |
Merge branch 'rh/peeling-tag-to-tag'
Make "foo^{tag}" to peel a tag to itself, i.e. no-op., and fail if
"foo" is not a tag. "git rev-parse --verify v1.0^{tag}" would be a
more convenient way to say "test $(git cat-file -t v1.0) = tag".
* rh/peeling-tag-to-tag:
peel_onion: do not assume length of x_type globals
peel_onion(): add support for <rev>^{tag}
Diffstat (limited to 't')
-rwxr-xr-x | t/t1511-rev-parse-caret.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t1511-rev-parse-caret.sh b/t/t1511-rev-parse-caret.sh index eaefc777bd..15973f2094 100755 --- a/t/t1511-rev-parse-caret.sh +++ b/t/t1511-rev-parse-caret.sh @@ -54,6 +54,13 @@ test_expect_success 'ref^{tree}' ' test_must_fail git rev-parse blob-tag^{tree} ' +test_expect_success 'ref^{tag}' ' + test_must_fail git rev-parse HEAD^{tag} && + git rev-parse commit-tag >expected && + git rev-parse commit-tag^{tag} >actual && + test_cmp expected actual +' + test_expect_success 'ref^{/.}' ' git rev-parse master >expected && git rev-parse master^{/.} >actual && |