t1507: Test that branchname@{upstream} is interpreted as branch
authorKacper Kornet <draenog@pld-linux.org>
Sun, 17 Mar 2013 22:17:09 +0000 (23:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 17 Mar 2013 22:38:23 +0000 (15:38 -0700)
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>
t/t1507-rev-parse-upstream.sh
index d6e576192fcd014ed5f570ceeab1152b93d91d1f..b27a7209f7401706f3b0a37b495fc0cb3a07c29e 100755 (executable)
@@ -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 &&