git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/3] request-pull: do something if $3 is passed

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 17, 2015, 21:08 UTC
Message-ID
<CA+55aFz4Dy=-bC8ccWfmHpquAWH+Fm0abmkW_dVB9M5wpm3qkQ@mail.gmail.com>
In-Reply-To
<xmqqiof01ca9.fsf@gitster.dls.corp.google.com>
On Tue, Feb 17, 2015 at 1:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> "HEAD should resolve as a tag" is not sensible, but "HEAD should
> locally DWIM to something sensible" is still possible, no?

I disagree. Why? Because what you have locally is *not* necessarily the same thing you have remotely.

And that's *exactly* why people used to send me broken pull requests. "git pull-request" would guess on things, and it would get the guesses wrong, and write the pull request wrong.

Show 6 quoted lines
> We could for example make the rule for unset $3 case like this:
> instead of the current "missing $3 is a request to pull HEAD":
>
>     If you have one and only one signed tag that happens to point at
>     the commit sitting at HEAD, behave as if that tag was given as
>     the third argument from the command line.

If you verify that "one and only" to be true both locally and remotely, then I guess I would be ok with it. But it really would have to be unique. And truly unique, as in no confusion about branches or tags, only one or the other. Because the "tag vs branch" was one of the main sources of confusion that made me repeatedly get bad pull requests, particularly when there was something locally that wasn't actually named the same thing remotely.

                         Linus
Previous: Junio C Hamano
Message 16 of 16 in “request-pull: do something if $3 is passed”
  1. 0/3 request-pull: do something if $3 is passedPaolo Bonzini, Feb 16, 2015
  2. 1/3 request-pull: fix expected format in testsPaolo Bonzini, Feb 16, 2015
  3. 2/3 request-pull: use "git tag --points-at" to detect local tagsPaolo Bonzini, Feb 16, 2015
  4. 3/3 request-pull: find matching tag or branch name on remote sidePaolo Bonzini, Feb 16, 2015
  5. Junio C HamanoFeb 16, 2015
  6. Paolo BonziniFeb 17, 2015
  7. Junio C HamanoFeb 17, 2015
  8. Paolo BonziniFeb 17, 2015
  9. Linus TorvaldsFeb 17, 2015
  10. Paolo BonziniFeb 17, 2015
  11. Linus TorvaldsFeb 17, 2015
  12. Paolo BonziniFeb 17, 2015
  13. Linus TorvaldsFeb 17, 2015
  14. Junio C HamanoFeb 18, 2015
  15. Junio C HamanoFeb 17, 2015
  16. Linus TorvaldsFeb 17, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.