Skip to content

Commit

Permalink
t1507: Test that branchname@{upstream} is interpreted as branch
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
draenog authored and gitster committed Mar 17, 2013
1 parent 47e329e commit 617cf93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions t/t1507-rev-parse-upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 617cf93

Please sign in to comment.