linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [git pull] vfs.git
Date: Mon, 16 May 2016 08:43:33 -0700	[thread overview]
Message-ID: <CA+55aFxefHGyVV4qa-neC-nw2Hx0=du022-tH0Lg0YKTRUY0-Q@mail.gmail.com> (raw)
In-Reply-To: <20160516033258.GE14480@ZenIV.linux.org.uk>

On Sun, May 15, 2016 at 8:32 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> FWIW, I considered sending that pile in several pull requests, but for some
> reason git request-pull v4.6 vfs work.lookups spews something very odd into
> diffstat - files that have never been touched by it and, in fact, doing
> merge with mainline does *not* end up with those files anywhere in the
> diff.

This is "normal" if you have multiple merge bases (which in turn
happens various ways, but all of them involved the branch having
merges in itself, either back-merges or just merging two or more topic
branches that had different starting points).

What happens is that request-pull will just pick the first merge base
and then do a diff against that - which can happen to work, but most
of the time you'll get part of the diff being from the differences
that happened betweeen the different merge bases, rather than just the
code that is in "your" branch.

The only way to get a reliably correct diff is to actually do the
merge (which is a much more complex operation when there are multiple
merge bases - git will actually do intermediate merges between the
merge bases and then do a merge based on that - it's why the default
git merge is called a "recursive" merge).

Some maintainers actually do that merge (into a private branch) to get
that reliable end result and also to get a heads-up about any merge
conflicts I would see when pulling. But I don't actually require it,
it's ok if the pull request ends up looking messy due to just using
the plain request-pull machinery without any merging.

The shortlog is always reliable, because that is not a "diff"
operation (which is inherently about two end-points - and with
multiple merge bases there are more than two end-points so "diff" is
inevitably too weak an operation to show the differences). The
shortlog is about the set of commits, and git will do the proper set
operation to see "commits in A but not in B". So if you get surprising
results in the shortlog, then that means that something is actually
wrong in your tree and you should look out.

> Full pile doesn't produce any oddities of that sort, so...

The fact that the full pile doesn't is likely just because the merges
you added, which brought in a new merge base and it may now be unique
(because you merged with my tree as you did them) or it just happens
to be one of the merge points that works by luck for "diff".

> If you prefer that stuff to go in separate pulls, please say so.

This time I'd really prefer it, especially that parallel lookup
branch. That's such a big fundamental change that it definitely merits
being merged separately rather than as part of "here's all the vfs
changes for 4.7"..

As mentioned, you *can* get the diff right by testing a pre-merge, but
you don't need to, and I'll take the messy diff.

Even when it doesn't match the diff after-the-merge, I can trivially
verify _why_ the pull-request diff differs. That happens not just
because of the multiple merge-bases issue, but you get differences
with merge diffs in other cases too (ie any case where merging had to
do any non-trivial merging action - perhaps due to part of a patch
already being applied in my tree for other reasons etc etc).

           Linus

  reply	other threads:[~2016-05-16 15:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16  3:32 [git pull] vfs.git Al Viro
2016-05-16 15:43 ` Linus Torvalds [this message]
2016-05-17  6:27   ` Al Viro
2016-05-17 18:27     ` Linus Torvalds
2016-05-17 20:11       ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2016-11-17  5:55 Al Viro
2016-11-11  6:05 Al Viro
2016-11-11 17:25 ` Linus Torvalds
2016-11-11 18:06   ` Ilya Dryomov
2016-11-12  3:36   ` Yan, Zheng
2016-10-11  3:07 Al Viro
2016-03-20  1:44 Al Viro
2016-03-20  1:55 ` Linus Torvalds
2016-03-20  1:59   ` Al Viro
2015-04-24 20:40 Al Viro
2014-12-10 19:13 [GIT PULL] vfs.git Al Viro
2014-12-11 16:18 ` Miklos Szeredi
2014-12-11 18:06   ` Al Viro
2014-12-11 18:34     ` Al Viro
2014-11-05 13:57 [git pull] vfs.git Al Viro
2014-11-02  5:58 Al Viro
2014-10-26  3:04 Al Viro
2014-05-28  6:38 Al Viro
2014-04-12 12:40 Al Viro
2014-04-13 18:53 ` Geert Uytterhoeven
2013-11-11 16:30 Al Viro
2013-11-13 14:52 ` J. Bruce Fields
2013-06-15  3:34 Al Viro
2012-12-21  0:21 Al Viro
2012-06-01 16:56 Al Viro
2012-06-01 17:38 ` Linus Torvalds
2012-06-01 17:48   ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+55aFxefHGyVV4qa-neC-nw2Hx0=du022-tH0Lg0YKTRUY0-Q@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).