Skip to contentSkip to conversation

2.0.0 regression? request pull does not seem to find head

DISCUSSION Michael S. Tsirkin 4 participants 6 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Looks like pull requests no longer work for me on linux. Some other trees (non-linux) work fine but I didn't yet check whether it's the local or the remote tree that's at issue.

Or maybe it's a configuration change that I missed?

Note: I have
[push]
default = matching
configured in .gitconfig.

[mst@robin linux]$ git request-pull net-next/master git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next
warn: No match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc found at git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
warn: Are you sure you pushed 'net-next' there?
The following changes since commit 96b2e73c5471542cb9c622c4360716684f8797ed:

Revert "net/mlx4_en: Use affinity hint" (2014-06-02 00:18:48 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next

for you to fetch changes up to 2ae76693b8bcabf370b981cd00c36cd41d33fabc:

vhost: replace rcu with mutex (2014-06-02 23:47:59 +0300)

----------------------------------------------------------------
Michael S. Tsirkin (2):
vhost-net: extend device allocation to vmalloc
vhost: replace rcu with mutex

 drivers/vhost/net.c   | 23 ++++++++++++++++++-----
 drivers/vhost/vhost.c | 10 +++++++++-
 2 files changed, 27 insertions(+), 6 deletions(-)

[mst@robin linux]$ git request-pull net-next/master git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next
warn: No match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc found at git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
warn: Are you sure you pushed 'net-next' there?
The following changes since commit 96b2e73c5471542cb9c622c4360716684f8797ed:

Revert "net/mlx4_en: Use affinity hint" (2014-06-02 00:18:48 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next

for you to fetch changes up to 2ae76693b8bcabf370b981cd00c36cd41d33fabc:

vhost: replace rcu with mutex (2014-06-02 23:47:59 +0300)

----------------------------------------------------------------
Michael S. Tsirkin (2):
vhost-net: extend device allocation to vmalloc
vhost: replace rcu with mutex

 drivers/vhost/net.c   | 23 ++++++++++++++++++-----
 drivers/vhost/vhost.c | 10 +++++++++-
 2 files changed, 27 insertions(+), 6 deletions(-)

[mst@robin linux]$ git --version
git version 2.0.0.538.gb6dd70f

[mst@robin linux]$ /usr/bin/git request-pull net-next/master git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next The following changes since commit 96b2e73c5471542cb9c622c4360716684f8797ed:

Revert "net/mlx4_en: Use affinity hint" (2014-06-02 00:18:48 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-next

for you to fetch changes up to 2ae76693b8bcabf370b981cd00c36cd41d33fabc:

vhost: replace rcu with mutex (2014-06-02 23:47:59 +0300)

----------------------------------------------------------------
Michael S. Tsirkin (2):
vhost-net: extend device allocation to vmalloc
vhost: replace rcu with mutex

 drivers/vhost/net.c   | 23 ++++++++++++++++++-----
 drivers/vhost/vhost.c | 10 +++++++++-
 2 files changed, 27 insertions(+), 6 deletions(-)

[mst@robin linux]$ /usr/bin/git --version
git version 1.8.3.1

Signature · 1 line
MST
#1 lore raw
Quoted 4 lines · Michael S. Tsirkin

[mst@robin linux]$ git request-pull net-next/master git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next
warn: No match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc found at git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
warn: Are you sure you pushed 'net-next' there?

git request-pull is clearly correct. There is no "net-next" in that public repository.

It *used* to be that request-pull then magically tried to fix it up for you, which in turn resulted in the guess not being right, like pointing to the wrong branch that just happened to have the same SHA1, or pointing to a branch when it _should_ have pointed to a tag.

Now, if you pushed your local "net-next" branch to another branch name (I can find a branch name called "vhost-next" at that repository, then you can *tell* git that, using the same syntax you must have used for the push.

So something like

git request-pull net-next/master
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
net-next:vhost-next

should work so that git doesn't end up having to guess (and potentially guessing wrong).

But it may actually be a simpler driver error, and you wanted to use "vhost-next", and that "net-next" was actually incorrect?

Linus

#2 lore raw
Quoted 2 lines · Linus Torvalds <torvalds <at> linux-foundation.org> writes:

On Mon, Jun 2, 2014 at 2:01 PM, Michael S. Tsirkin <mst <at> redhat.com>

Quoted 4 lines · wrote:
Quoted 2 lines

[mst <at> robin linux]$ git request-pull net-next/master

git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next

Quoted 1 line

warn: No match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc found

at git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git

Quoted 4 lines
Quoted 1 line

warn: Are you sure you pushed 'net-next' there?

git request-pull is clearly correct. There is no "net-next" in that public repository.

I am seeing something similar:

$ git request-pull master origin > /dev/null
warn: No match for commit 64ea29197d5e13772b1f7b6c24feaa79cc97d997 found at
origin
warn: Are you sure you pushed 'HEAD' there?

but I pushed 64ea29197d5e13772b1f7b6c24feaa79cc97d997:

$ git show-ref bug_fix/init_report
64ea29197d5e13772b1f7b6c24feaa79cc97d997 refs/heads/bug_fix/init_report
64ea29197d5e13772b1f7b6c24feaa79cc97d997 
refs/remotes/origin/bug_fix/init_report

The warning goes away if I give an explicit end commit.

Should the default value for $remote in the call to $find_matching_ref be $head rather than HEAD (and similarly for the warning message)?

--James

#4 lore raw
In reply to Michael S. Tsirkin
Quoted 1 line · Michael S. Tsirkin

Looks like pull requests no longer work for me on linux.

Wasn't "does not seem to find head" was very much deliberate?

Linus's patch wanted the users to explicitly tell the tool, without tool trying to be too helpful and risking to guess incorrectly.

Quoted 10 lines

Some other trees (non-linux) work fine but I didn't yet check whether it's the local or the remote tree that's at issue.

Or maybe it's a configuration change that I missed?

Note: I have
[push]
default = matching
configured in .gitconfig.

This should not affect anything in request-pull, I think.

#5 lore raw
Quoted 5 lines · Junio C Hamano
Quoted 1 line · Michael S. Tsirkin

Looks like pull requests no longer work for me on linux.

Wasn't "does not seem to find head" was very much deliberate?

I'm sorry I don't understand what you are asking here. Same thing happens if I use a branch name explicitly, not just HEAD.

Quoted 2 lines

Linus's patch wanted the users to explicitly tell the tool, without tool trying to be too helpful and risking to guess incorrectly.

So this is an intentional behaviour change?
Which patch do you refer to?

Quoted 4 lines
Quoted 4 lines

Some other trees (non-linux) work fine but I didn't yet check whether it's the local or the remote tree that's at issue.

Quoted 8 lines
Quoted 6 lines

Or maybe it's a configuration change that I missed?

Note: I have
[push]
default = matching
configured in .gitconfig.

This should not affect anything in request-pull, I think.

I just thought I'd mention this.
push behaviour is the only big incompatible change I'm aware of between 1.8 which works for me and 2.0 which doesn't.

Signature · 1 line
MST
#3 lore raw
In reply to Linus Torvalds
Quoted 8 lines · Linus Torvalds
Quoted 4 lines · Michael S. Tsirkin

[mst@robin linux]$ git request-pull net-next/master git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-next
warn: No match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc found at git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
warn: Are you sure you pushed 'net-next' there?

git request-pull is clearly correct. There is no "net-next" in that public repository.

OK, I see that it's correct.
It used to match commit and go from there, but it does not anymore, and I didn't know this.

However, it does not tell me this.
It tells me there's no match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc:
that commit is there.
Also "match" implies some matching still going on, might be best to drop this.

Quoted 4 lines

It *used* to be that request-pull then magically tried to fix it up for you, which in turn resulted in the guess not being right, like pointing to the wrong branch that just happened to have the same SHA1, or pointing to a branch when it _should_ have pointed to a tag.

Why not just put the SHA1 in there?
In fact it would be a bit more robust in case of
non-signed pull requests, won't it?

Quoted 11 lines

Now, if you pushed your local "net-next" branch to another branch name (I can find a branch name called "vhost-next" at that repository, then you can *tell* git that, using the same syntax you must have used for the push.

So something like

git request-pull net-next/master
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
net-next:vhost-next

Quoted 7 lines

should work so that git doesn't end up having to guess (and potentially guessing wrong).

But it may actually be a simpler driver error, and you wanted to use "vhost-next", and that "net-next" was actually incorrect?

Linus

Yes: net-next is a local name, on the remote it's called vhost-next.

I realize now that with

       git request-pull [-p] <start> <url> [<end>]

<end> actually is a name of commit in the *remote* tree, not the local one.
Documentation could be improved a bit:

Commit to end at (defaults to HEAD). This names the commit at
the tip of the history you are asking to be pulled.

When the repository named by <url> has the commit at a tip of
a ref that is different from the ref you have locally, you can use
the <local>:<remote> syntax, to have its local name, a colon
:, and its remote name.

It does not have to be commit (could be signed tag), and
that text does not make it very clear what is different from what
until you re-read it a couple of times.
How about:
Object (commit or tag) to end at (defaults to HEAD). This names the object at
the tip of the history you are asking to be pulled.
The name <end> must refer to the same object in both the local tree and the remote tree pointed at by <url>.

If the object that you want pulled has a different name in the local and the remote trees, you can use the <local>:<remote> syntax, to have its local name, a colon
:, and its remote name.

The error message could be improved too, it asks me whether I pushed net-next which I did.
Would be nicer if it asked "Pushed net-next to net-next there?"

Also, how is it supposed to work without <end>?

git request-pull net-next/master
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
warn: No match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc found at git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
warn: Are you sure you pushed 'HEAD' there?

Where should I push HEAD, and how?
In fact does git let you push to HEAD?

Finally, the output even with a warning could be better:

git request-pull net-next/master
git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
warn: No match for commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc found at git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git
warn: Are you sure you pushed 'HEAD' there?
The following changes since commit 96b2e73c5471542cb9c622c4360716684f8797ed:

Revert "net/mlx4_en: Use affinity hint" (2014-06-02 00:18:48 -0700)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git

If someone does not notice the warning (e.g. the warning is on stderr and script could only redirect stdout) then pull request is actually wrong.
It would be better to find the commit on both sides and if it's there, just use the hash name.

Signature · 1 line
MST