aboutsummaryrefslogtreecommitdiff
path: root/t/t5505-remote.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-09-17 19:10:31 -0700
committerJunio C Hamano <gitster@pobox.com>2013-09-17 21:58:46 -0700
commita45b5f0552eec3c8800edae44e071cf1d647bf96 (patch)
treea66825b2ce5be27798c0cb33510c561ea657907a /t/t5505-remote.sh
parent5d54cffc36f654721302a717ff12fb317c1b494a (diff)
downloadgit-a45b5f0552eec3c8800edae44e071cf1d647bf96.tar.gz
git-a45b5f0552eec3c8800edae44e071cf1d647bf96.tar.xz
connect: annotate refs with their symref information in get_remote_head()
By doing this, clients of upload-pack can now reliably tell what ref a symbolic ref points at; the updated test in t5505 used to expect failure due to the ambiguity and made sure we give diagnostics, but we no longer need to be so pessimistic. Make sure we correctly learn which branch HEAD points at from the other side instead. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-xt/t5505-remote.sh15
1 files changed, 4 insertions, 11 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 197d3f763..ac79dd915 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -160,9 +160,7 @@ cat >test/expect <<EOF
* remote two
Fetch URL: ../two
Push URL: ../three
- HEAD branch (remote HEAD is ambiguous, may be one of the following):
- another
- master
+ HEAD branch: master
Local refs configured for 'git push':
ahead forces to master (fast-forwardable)
master pushes to another (up to date)
@@ -262,17 +260,12 @@ test_expect_success 'set-head --auto' '
)
'
-cat >test/expect <<\EOF
-error: Multiple remote HEAD branches. Please choose one explicitly with:
- git remote set-head two another
- git remote set-head two master
-EOF
-
-test_expect_success 'set-head --auto fails w/multiple HEADs' '
+test_expect_success 'set-head --auto has no problem 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 &&
+ git remote set-head --auto two >output 2>&1 &&
+ echo "two/HEAD set to master" >expect &&
test_i18ncmp expect output
)
'