Skip to content

Commit 617cf93

Browse files
draenoggitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 47e329e commit 617cf93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

t/t1507-rev-parse-upstream.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ test_expect_success 'my-side@{upstream} resolves to correct full name' '
5454
test refs/remotes/origin/side = "$(full_name my-side@{u})"
5555
'
5656

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+
5761
test_expect_success 'my-side@{u} resolves to correct commit' '
5862
git checkout side &&
5963
test_commit 5 &&

0 commit comments

Comments
 (0)