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

Re: BUG: git request-pull broken for plain branches

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 25, 2014, 12:05 UTC
Message-ID
<CA+55aFwZb7tT7xb7y2XJpzcmrxB=Rf--bjz5XbBcxC-7MMm9eg@mail.gmail.com>
In-Reply-To
<20140625095535.GA27365@pengutronix.de>

On Wed, Jun 25, 2014 at 2:55 AM, Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:

Show 8 quoted lines
>
>         $ git rev-parse HEAD
>         9e065e4a5a58308f1a0da4bb80b830929dfa90b3
>         $ git ls-remote origin | grep 9e065e4a5a58308f1a0da4bb80b830929dfa90b3
>         9e065e4a5a58308f1a0da4bb80b830929dfa90b3        refs/heads/ukl/for-mainline
>         $ git request-pull origin/master origin HEAD > /dev/null
>         warn: No match for commit 9e065e4a5a58308f1a0da4bb80b830929dfa90b3 found at origin
>         warn: Are you sure you pushed 'HEAD' there?
Notice how "HEAD" does not match.

The error message is perhaps misleading. It's not enough to match the commit. You need to match the branch name too. git used to guess the branch name (from the commit), and it often guessed wrongly. So now they need to match.

So you should do
    git request-pull origin/master origin ukl/for-mainline
to let request-pull know that you're requesting a pull for "ukl/for-mainline".

If you have another name for that branch locally (ie you did something like "git push origin local:remote"), then you can say

    git request-pull origin/master origin local-name:remote-name
to specify what the branch to be pulled is called locally vs remotely.

In other words, what used to be "pick some branch randomly" is now "you need to _specify_ the branch".

                Linus
Previous: Uwe Kleine-KönigNext: Uwe Kleine-König
Message 2 of 5 in “BUG: git request-pull broken for plain branches”
  1. Uwe Kleine-KönigJun 25, 2014
  2. Linus TorvaldsJun 25, 2014
  3. Uwe Kleine-KönigJun 25, 2014
  4. Junio C HamanoJun 25, 2014
  5. Uwe Kleine-KönigJun 26, 2014

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.