Re: [PATCH 0/3] request-pull: do something if $3 is passed
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Feb 17, 2015, 21:04 UTC
- Message-ID
- <CA+55aFxdxzeHmckgn5ZSvXKr9VOztNApif+=5xmZ+4v=RhUryQ@mail.gmail.com>
- In-Reply-To
- <54E3AA41.5070209@gnu.org>
On Tue, Feb 17, 2015 at 12:53 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
Show 6 quoted lines
> > Without $3, git tries to do things that make no sense like "git show-ref > --heads --tags HEAD"; or that make little sense when requesting a pull, > like looking for HEAD in the output of "git ls-remote". But from the > release notes of 2.0 it looks like it's intended and the script is just > taking shortcuts.
It is *you* who make no sense.
Looking for HEAD in "git ls-remote"? Perfectly sensible:
[torvalds@i7 linux]$ git ls-remote origin | grep HEAD
cc4f9c2a91b7be7b3590bb1cbe8148873556aa3f HEADthat's the default thing when you don't specify any particular branch or tag.
> Ok, in 1.9.x I used to not say anything; if the new workflow is to > always specify a tag, that's okay.
Indeed. You have to specify what you want me to pull. Exactly because in 1.9.x people didn't, and I got *really* tired of getting bogus pull requests that didn't work, or pointed at the wrong branch when people had multiple branches with the same contents etc.
> I wanted git to find the matching tag on the remote side when I use "git > request-pull origin/master URL" with no third parameter, since I never > request pulls except with a single signed tag.
The thing is, HEAD works. Not for you, because you don't use HEAD. But because you don't use HEAD, you shouldn't use the default.
I *would* agree to making $3 be mandatory, but there are still people out there who just use a single branch per repository and no signed branches. Which is the only reason that "default HEAD' thing exists.
:Linus