• J
    refs outside refs/{heads,tags} match less strongly. · 29561ad0
    Junio C Hamano 提交于
    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: NJunio C Hamano <junkio@cox.net>
    29561ad0
connect.c 17.1 KB