t5505: fix "set-head --auto with ambiguous HEAD" test
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>
Junio C Hamano committed
Sep 17, 2013 at 21:45 UTC
a4dfee06806df64b7a44866f67f15b54567ec722
1 file changed
+1
t/t5505-remote.sh
+1
@@ -271,6 +271,7 @@ EOF
271
test_expect_success 'set-head --auto fails w/multiple HEADs' '
272
(
273
cd test &&
274
+ git fetch two "refs/heads/*:refs/remotes/two/*" &&
275
test_must_fail git remote set-head --auto two >output 2>&1 &&
276
test_i18ncmp expect output
277
)