diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-09-17 19:10:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-17 21:58:46 -0700 |
commit | a45b5f0552eec3c8800edae44e071cf1d647bf96 (patch) | |
tree | a66825b2ce5be27798c0cb33510c561ea657907a /t/t5505-remote.sh | |
parent | 5d54cffc36f654721302a717ff12fb317c1b494a (diff) | |
download | git-a45b5f0552eec3c8800edae44e071cf1d647bf96.tar.gz |
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-x | t/t5505-remote.sh | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 197d3f763d..ac79dd915d 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 ) ' |