Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310438 > unrolled thread

[git pull] vfs.git regression fix

Started byAl Viro <viro@ZenIV.linux.org.uk>
First post2016-01-15 21:20 +0100
Last post2016-01-18 08:50 +0100
Articles 7 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [git pull] vfs.git regression fix Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-15 21:20 +0100
    Re: [git pull] vfs.git regression fix Linus Torvalds <torvalds@linux-foundation.org> - 2016-01-15 21:50 +0100
      Re: [git pull] vfs.git regression fix Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-15 22:10 +0100
        Re: [git pull] vfs.git regression fix Linus Torvalds <torvalds@linux-foundation.org> - 2016-01-15 22:10 +0100
          Re: [git pull] vfs.git regression fix Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-16 14:50 +0100
            Re: [git pull] vfs.git regression fix Linus Torvalds <torvalds@linux-foundation.org> - 2016-01-16 20:10 +0100
            Re: [git pull] vfs.git regression fix Tomi Valkeinen <tomi.valkeinen@ti.com> - 2016-01-18 08:50 +0100

#1310438 — [git pull] vfs.git regression fix

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2016-01-15 21:20 +0100
Subject[git pull] vfs.git regression fix
Message-ID<qRj0J-2C0-3@gated-at.bofh.it>
	Fix for braino introduced in vfs.git#work.misc.  Please, pull from
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git

Shortlog:
Borislav Petkov (1):
      amdkfd: Copy from the proper user command pointer

Diffstat:
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

[toc] | [next] | [standalone]


#1310456

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2016-01-15 21:50 +0100
Message-ID<qRjtM-2NO-11@gated-at.bofh.it>
In reply to#1310438
Al,
 _please_ learn to be more careful about your pull requests.

This one is garbage.

Why?

You ask me to pull from the wrong source. You ask me to pull from

   git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

but that is some random state from January 2014. Two years ago.

What you actually *meant* was apparently the "for-linus" branch, since
that matches the shortlog and diffstat. But that's not what your pull
request asked me to pull.

This is not the first time. You seem to either use buggy scripts, or
do this (wrong) by hand. Please fix whatever it is, so that I don't
have to go look or guess after I notice that I pulled crap.

                    Linus

On Fri, Jan 15, 2016 at 12:18 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>         Fix for braino introduced in vfs.git#work.misc.  Please, pull from
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
>
> Shortlog:
> Borislav Petkov (1):
>       amdkfd: Copy from the proper user command pointer
>
> Diffstat:
>  drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

[toc] | [prev] | [next] | [standalone]


#1310462

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2016-01-15 22:10 +0100
Message-ID<qRjN8-39u-5@gated-at.bofh.it>
In reply to#1310456
On Fri, Jan 15, 2016 at 12:41:06PM -0800, Linus Torvalds wrote:
> Al,
>  _please_ learn to be more careful about your pull requests.
> 
> This one is garbage.
> 
> Why?
> 
> You ask me to pull from the wrong source. You ask me to pull from
> 
>    git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
> 
> but that is some random state from January 2014. Two years ago.
> 
> What you actually *meant* was apparently the "for-linus" branch, since
> that matches the shortlog and diffstat. But that's not what your pull
> request asked me to pull.
> 
> This is not the first time. You seem to either use buggy scripts, or
> do this (wrong) by hand. Please fix whatever it is, so that I don't
> have to go look or guess after I notice that I pulled crap.

Buggy scripts, actually.  The thing that generates them takes a branch
name as argument; turns out that it (pretty much by accident) treats the
missing argument as HEAD.  Which tends to give reasonable diffstat and
shortlog, so I hadn't spotted the missing check until now.

Fixed.  BTW, is there any better way to get the current branch name than
git branch |sed -ne '/\* /s///p'?

[toc] | [prev] | [next] | [standalone]


#1310467

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2016-01-15 22:10 +0100
Message-ID<qRjN8-39u-15@gated-at.bofh.it>
In reply to#1310462
On Fri, Jan 15, 2016 at 1:00 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> Buggy scripts, actually.  The thing that generates them takes a branch
> name as argument; turns out that it (pretty much by accident) treats the
> missing argument as HEAD.  Which tends to give reasonable diffstat and
> shortlog, so I hadn't spotted the missing check until now.

You could try "git request-pull". It _used_ to have somewhat similar
issues, especially when the local branch had not made it to the remote
point yet, but it should be good now. It actually warns if the remote
name you give doesn't contain what the local branch contanis etc.

> Fixed.  BTW, is there any better way to get the current branch name than
> git branch |sed -ne '/\* /s///p'?

"git symbolic-ref HEAD" will show what HEAD points to. That's probably
what you'd want..

Not that there is anything *wrong* with looking at "git branch"
output, but that's really meant to be more human-readable than for
scripting.

             Linus

[toc] | [prev] | [next] | [standalone]


#1310951

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2016-01-16 14:50 +0100
Message-ID<qRzoR-50b-1@gated-at.bofh.it>
In reply to#1310467
On Fri, Jan 15, 2016 at 01:08:44PM -0800, Linus Torvalds wrote:
> On Fri, Jan 15, 2016 at 1:00 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > Buggy scripts, actually.  The thing that generates them takes a branch
> > name as argument; turns out that it (pretty much by accident) treats the
> > missing argument as HEAD.  Which tends to give reasonable diffstat and
> > shortlog, so I hadn't spotted the missing check until now.
> 
> You could try "git request-pull". It _used_ to have somewhat similar
> issues, especially when the local branch had not made it to the remote
> point yet, but it should be good now. It actually warns if the remote
> name you give doesn't contain what the local branch contanis etc.

Having checked how git request-pull reacts to missing branch argument...
Very similar bug there - it gives stats for HEAD and URI with no branch
name.  Might've been fixed in later versions (it's 2.1.4 here - debian-stable)

FWIW, the main inconvenience with git request-pull is that it still needs
s/gitolite@ra.kernel.org:/git:\/\/git.kernel.org/ postprocessing.  It mimics
the git push, but the remote you are pushing to probably won't be usable for
pulling by others.  Looks like it would be useful to have something like
	pull_url = git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
to go with
	url = gitolite@ra.kernel.org:/pub/scm/linux/kernel/git/viro/vfs.git
in .git/config, settable by something in git remote.  OTOH, it's possible to
emulate by setting an extra remote and using git push vfs <...> for pushes,
while doing git request-pull origin vfs-pull <...> for pull requests...

[toc] | [prev] | [next] | [standalone]


#1311010

FromLinus Torvalds <torvalds@linux-foundation.org>
Date2016-01-16 20:10 +0100
Message-ID<qREoy-ag-5@gated-at.bofh.it>
In reply to#1310951
On Sat, Jan 16, 2016 at 5:44 AM, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> Having checked how git request-pull reacts to missing branch argument...

A missing branch name is the same as HEAD, so:

> Very similar bug there - it gives stats for HEAD and URI with no branch
> name.  Might've been fixed in later versions (it's 2.1.4 here - debian-stable)

If you say "no branch name", then it assumes that it's head in your
local and remote repositories.

So it's expected. It also *should* warn about the fact that the remote
repository HEAD does not match. Does it not do that?

Anyway, in general, you should always use a branch-name for "git
request-pull", since you use branches. The "no branch name" is really
only meant for the very original kind of git workflow where you don't
use branches at all. Some people still do that (David Miller seems to
prefer separate repositories over multiple branches, for example), but
it's starting to be unusual.

Also, if your local branch is named differently from your remote one,
you need to use the same format as you would have done for "git push"
to push it out, so you'd do

    git request-pull remote-repo local-branch-name:remote-branch-name

but quite frankly, I wouldn't recommend that workflow. I think it's
too prone to mistakes.

> FWIW, the main inconvenience with git request-pull is that it still needs
> s/gitolite@ra.kernel.org:/git:\/\/git.kernel.org/ postprocessing.

So what I always do on all my repositories is that "origin" ends up
being the public thing, and then I have a separate set of things I
push to.

Now, the reason I do that is that pushing is different from pulling,
not only because of the whole security thing, but because I push to
multiple repos.

So my .gti/config looks roughly like this:

[remote "origin"]
    url = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
    fetch = +refs/heads/*:refs/remotes/origin/*

[branch "master"]
    remote = origin
    merge = refs/heads/master

[remote "all"]
    url = ra.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux
    url = git@github.com:torvalds/linux.git

and that means that when I pull from my own remote (which I actually
do when I travel - it's hoe I synchronize my laptop and desktop), I
use origin. And when I push, I do "git push all", and it pushes to
both kernel.org and to the github "mirror".

And a plain "git push" simply won't work, which is fine.

                  Linus

[toc] | [prev] | [next] | [standalone]


#1311355

FromTomi Valkeinen <tomi.valkeinen@ti.com>
Date2016-01-18 08:50 +0100
Message-ID<qScJz-5UR-1@gated-at.bofh.it>
In reply to#1310951

[Multipart message — attachments visible in raw view] — view raw

On 16/01/16 15:44, Al Viro wrote:

> FWIW, the main inconvenience with git request-pull is that it still needs
> s/gitolite@ra.kernel.org:/git:\/\/git.kernel.org/ postprocessing.  It mimics
> the git push, but the remote you are pushing to probably won't be usable for
> pulling by others.  Looks like it would be useful to have something like
> 	pull_url = git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
> to go with
> 	url = gitolite@ra.kernel.org:/pub/scm/linux/kernel/git/viro/vfs.git
> in .git/config, settable by something in git remote.  OTOH, it's possible to
> emulate by setting an extra remote and using git push vfs <...> for pushes,
> while doing git request-pull origin vfs-pull <...> for pull requests...
 
Isn't "pushurl" for that? I have:

[remote "origin"]
        url = git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git
        pushurl = gitolite.kernel.org:/pub/scm/linux/kernel/git/tomba/linux.git
        fetch = +refs/heads/*:refs/remotes/origin/*

 Tomi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web