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>
Kacper Kornet committed
Mar 17, 2013 at 23:17 UTC
617cf93182279eec554dda03f44ac6a250e183aa
1 file changed
+4
t/t1507-rev-parse-upstream.sh
+4
@@ -54,6 +54,10 @@ test_expect_success 'my-side@{upstream} resolves to correct full name' '
54
test refs/remotes/origin/side = "$(full_name my-side@{u})"
55
'
56
57
+test_expect_success 'refs/heads/my-side@{upstream} does not resolve to my-side{upstream}' '
58
+ test_must_fail full_name refs/heads/my-side@{upstream}
59
+'
60
+
61
test_expect_success 'my-side@{u} resolves to correct commit' '
62
git checkout side &&
63
test_commit 5 &&