git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Matthew DeVore" <matvore@pobox.com>
To: "Jeff King" <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Buggy `git log -- path` behavior
Date: Fri, 17 Mar 2023 11:46:26 -0500	[thread overview]
Message-ID: <ae193764-daf2-4fff-89cf-39396f420cb3@app.fastmail.com> (raw)
In-Reply-To: <ZBH7Uiv7fH9UnB4v@coredump.intra.peff.net>

On Wed, Mar 15, 2023, at 12:07, Jeff King wrote:
> I think what you're seeing is the correct output, though, due to history
> simplification. Along the first-parent history, for example,
> Documentation/vm/pagemap.rst never existed.  And so since it does not
> exist now, we prune any side branches where it did (because they did not
> lead to the current state; the other side of the merge resolution did).
> 
> Tracking down the exact sequence of merges is tricky ("git log --graph"
> is unreadably huge here). But it looks like the file was added by
> ad56b738c5dd (docs/vm: rename documentation files to .rst, 2018-03-21).
> That was merged into docs-next via 24844fd33945 (Merge branch 'mm-rst'
> into docs-next, 2018-04-16), which then eventually moved it in
> 1ad1335dc586 (docs/admin-guide/mm: start moving here files from
> Documentation/vm, 2018-04-18).

This was thought-provoking. ad56b738c5dd is a side-branch. I expected a
path filter to find changes since git log would show this commit when
invoked with no other args.

But the only reason git follows the side branch in the filterless or
'pagemap.*' case is because git sees pagemap.txt (matching the glob) in
the first-parent line being removed when the side branch is merged into
this first-parent line.

As I usually use --name-status as a default in my workflow, I was
surprised git log couldn't find something that grep could :)

Thank you for the thorough explanation despite my terse complaint.

      reply	other threads:[~2023-03-17 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 16:04 Buggy `git log -- path` behavior Matthew DeVore
2023-03-15 17:07 ` Jeff King
2023-03-17 16:46   ` Matthew DeVore [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=ae193764-daf2-4fff-89cf-39396f420cb3@app.fastmail.com \
    --to=matvore@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).