diff options
author | Kacper Kornet <draenog@pld-linux.org> | 2013-03-18 02:17:09 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-03-18 02:38:23 +0400 |
commit | 617cf93182279eec554dda03f44ac6a250e183aa (patch) | |
tree | e4509c103138f43053baec48ffde49d6831a293f | |
parent | 47e329ef7c46de8ccdc8c4e40333579264a83c21 (diff) |
t1507: Test that branchname@{upstream} is interpreted as branch
Syntax branchname@{upstream} should interpret its argument as a name of
a branch. Add the test to check that it doesn't try to interpret it as a
refname if the branch in question does not exist.
Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | t/t1507-rev-parse-upstream.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t1507-rev-parse-upstream.sh b/t/t1507-rev-parse-upstream.sh index d6e576192f..b27a7209f7 100755 --- a/t/t1507-rev-parse-upstream.sh +++ b/t/t1507-rev-parse-upstream.sh @@ -54,6 +54,10 @@ test_expect_success 'my-side@{upstream} resolves to correct full name' ' test refs/remotes/origin/side = "$(full_name my-side@{u})" ' +test_expect_success 'refs/heads/my-side@{upstream} does not resolve to my-side{upstream}' ' + test_must_fail full_name refs/heads/my-side@{upstream} +' + test_expect_success 'my-side@{u} resolves to correct commit' ' git checkout side && test_commit 5 && |