Skip to content

Commit

Permalink
t5505: fix "set-head --auto with ambiguous HEAD" test
Browse files Browse the repository at this point in the history
When two or more branches point at the same commit and HEAD is
pointing at one of them, without the symref extension, there is no
way to remotely tell which one of these branches HEAD points at.
The test in question attempts to make sure that this situation is
diagnosed and results in a failure.

However, even if there _were_ a way to reliably tell which branch
the HEAD points at, "set-head --auto" would fail if there is no
remote tracking branch.  Make sure that this test does not fail
for that "wrong" reason.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Sep 18, 2013
1 parent e230c56 commit a4dfee0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t/t5505-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ EOF
test_expect_success 'set-head --auto fails w/multiple HEADs' '
(
cd test &&
git fetch two "refs/heads/*:refs/remotes/two/*" &&
test_must_fail git remote set-head --auto two >output 2>&1 &&
test_i18ncmp expect output
)
Expand Down

0 comments on commit a4dfee0

Please sign in to comment.