linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux ARM Kernel Mailing List 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [GIT PULL] arm64: Fixes for -rc4
Date: Fri, 18 Oct 2019 12:17:34 -0700	[thread overview]
Message-ID: <CAHk-=whmtB98b8=YL2b8HzPKRadk2A9pL0aasmvgebhePrDP9w@mail.gmail.com> (raw)
In-Reply-To: <20191018174153.slpmkvsz45hb6cts@willie-the-truck>

On Fri, Oct 18, 2019 at 10:42 AM Will Deacon <will@kernel.org> wrote:
>
> Thanks, that's helpful to know for next time. I guess I'm most surprised by
> the discrepancy between the shortlog and the diffstat, whereas I intuitively
> expected them to be generated in the same way.

So logs and diffs are fundamentally different.

A log is an operation on a _set_ of commits (that's the whole point -
you don't list the beginning and the end, you list all the commits in
between), while a diff is fundamentally an operation on two end-points
and shows the code difference between those two points.

And the summary versions of those operations (shortlog and diffstat)
are no different.

So as a set operation, "shortlog" has no issues with multiple merge
bases. Doing a shortlog is still just a set difference between your
commits and the upstream commits, and the number of merge bases is
irrelevant. "List all commits that I have, but upstream doesn't have"
is a very straightforward and natural set operation.

But as a "two endpoints" operation, diffstat has real problems any
time you have more than two endpoints - when you have multiple merge
bases, you fundamentally have more than two endpoints: you have all of
the merge bases, and then you have your end result.

What you doing the merge does is to turn the multiple merge bases into
just one point: the thing you merged against now becomes the common
merge point, and now you have a "two endpoints" for the diffstat: the
thing you merged against, and your end result are now the two points
that you can diff against.

But the shortlog is always correct, because it just doesn't even care
about that whole issue.

                Linus

  reply	other threads:[~2019-10-18 19:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 23:43 [GIT PULL] arm64: Fixes for -rc4 Will Deacon
2019-10-18  0:06 ` Linus Torvalds
2019-10-18 17:41   ` Will Deacon
2019-10-18 19:17     ` Linus Torvalds [this message]
2019-10-21  6:46       ` Ingo Molnar
2019-10-21 11:45         ` Linus Torvalds
2019-10-22  8:16         ` Uwe Kleine-König
2019-10-18  0:15 ` pr-tracker-bot
2019-10-18 20:09 ` Jayachandran Chandrasekharan Nair
  -- strict thread matches above, loose matches on Subject: below --
2023-01-13 10:29 [GIT PULL] arm64 fixes " Will Deacon
2023-01-13 13:58 ` pr-tracker-bot
2022-09-02 11:12 Will Deacon
2022-09-02 18:30 ` pr-tracker-bot
2022-04-22 11:20 Will Deacon
2022-04-22 21:19 ` pr-tracker-bot
2021-12-03 13:19 Will Deacon
2021-12-03 18:53 ` pr-tracker-bot
2020-11-13 12:39 GIT " Will Deacon
2020-11-13 12:44 ` [GIT " Will Deacon
2020-11-13 17:25   ` Linus Torvalds
2020-07-04 13:05 Will Deacon
2020-07-05 17:35 ` pr-tracker-bot
2019-06-07 15:13 [GIT PULL] arm64: " Will Deacon
2019-06-07 16:45 ` pr-tracker-bot
2019-04-05 17:17 [GIT PULL] arm64 " Catalin Marinas
2019-04-05 23:50 ` pr-tracker-bot
2018-09-14 16:19 [GIT PULL] arm64: " Will Deacon
2017-12-15 18:31 Will Deacon
2017-08-04 18:32 Will Deacon
2016-06-17 17:07 Will Deacon
2015-05-14 15:48 Will Deacon
2015-01-09 15:22 Will Deacon

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='CAHk-=whmtB98b8=YL2b8HzPKRadk2A9pL0aasmvgebhePrDP9w@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will@kernel.org \
    /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).