Re: push fails with unexpected 'matches more than one'

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Steffen Prohaska <prohaska@...>
Cc: Git Mailing List <git@...>
Date: Friday, October 12, 2007 - 11:21 pm

Steffen Prohaska <prohaska@zib.de> wrote:

I think its a bug.  But I didn't write the original code.

Meaning I think what happened here was someone wanted to enable
git-send-pack to match "master" here with "refs/heads/master" on
the remote side.  One easy way to do that was to see if any ref
ended with "/master", as that was what the ref here was called.

Way back when that code was written most Git repositories probably
only ever had that one branch anyway, or maybe two (refs/heads/master
and refs/heads/origin) so matching the trailing suffix never came
up as a bug.  Nobody ever had two refs that could possibly match.

Then the documentation got expanded to actually document the behavior
that git-send-pack implemented.  Unfortunately that codified the
bug as documented behavior.


So I agree with you Steffen, this is a bug in send-pack, and I run
up against it every once in a while.  I've specifically told my
coworkers "NEVER, EVER, EVER, create a branch called 'master' that
isn't exactly refs/heads/master OR ELSE I WILL COME BEAT YOU WITH A
CLUE STICK".  They still create "refs/heads/experiments/master".
*sigh*.

I think we should fix it.  Anyone that is relying on "git push
$url master" to resolve to "refs/heads/experimental/master" on the
remote side is already playing with fire.  But Junio is (rightfully
so) very conservative and doesn't like to break a user's scripts.
We may not be able to fix this until Git 1.6.

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
push fails with unexpected 'matches more than one', Steffen Prohaska, (Fri Oct 12, 2:59 am)
Re: push fails with unexpected 'matches more than one', Steffen Prohaska, (Fri Oct 12, 8:06 am)
Re: push fails with unexpected 'matches more than one', Shawn O. Pearce, (Fri Oct 12, 11:21 pm)
Re: push fails with unexpected 'matches more than one', Steffen Prohaska, (Sat Oct 13, 12:51 pm)