refs outside refs/{heads,tags} match less strongly.
commit29561ad0adadf4884858c209bb22b41d8d9a66ba
authorJunio C Hamano <junkio@cox.net>
Fri, 24 Nov 2006 05:52:18 +0000 (23 21:52 -0800)
committerJunio C Hamano <junkio@cox.net>
Fri, 24 Nov 2006 06:52:52 +0000 (23 22:52 -0800)
treeb601dee164be7d38093e8c83d133e1adabfe0dec
parentf73da29fa2be2f4bbda86e006b743b8121bdbf19
refs outside refs/{heads,tags} match less strongly.

This changes the refname matching logic used to decide which ref
is updated with git-send-pack.  We used to error out when
pushing 'master' when the other end has both 'master' branch and
a tracking branch 'remotes/$name/master' but with this, 'master'
matches only 'refs/heads/master' when both and no other 'master'
exist.

Pushing 'foo' when both heads/foo and tags/foo exist at the
remote end is still considered an error and you would need to
disambiguate between them by being more explicit.

When neither heads/foo nor tags/foo exists at the remote,
pushing 'foo' when there is only remotes/origin/foo is not
ambiguous, while it still is ambiguous when there are more than
one such weaker match (remotes/origin/foo and remotes/alt/foo,
for example).

Signed-off-by: Junio C Hamano <junkio@cox.net>
connect.c