From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: "Marc Branchaud" <marcnarc@xiplink.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Toon Claes" <toon@iotcl.com>,
git@vger.kernel.org, "Taylor Blau" <me@ttaylorr.com>,
"Derrick Stolee" <stolee@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH RFC 0/5] Introduce git-blame-tree(1) command
Date: Fri, 16 May 2025 06:38:02 +0200 [thread overview]
Message-ID: <aCbBKj7O9LjO3SMK@pks.im> (raw)
In-Reply-To: <20250515193046.GA3320240@coredump.intra.peff.net>
On Thu, May 15, 2025 at 03:30:46PM -0400, Jeff King wrote:
> On Thu, May 15, 2025 at 01:39:59PM -0400, Marc Branchaud wrote:
>
> > > As an end-user, I view "where does the body of this function came
> > > from" and "when did I touch this file the last time" quite different
> > > and unrelated kind of queries.
> >
> > I can see them either way, depending on how I squint. I have no objection
> > if people want to think of this new operation as
> > something-that-is-not-a-blame. But then don't call it blame-tree!
> >
> > How about last-touch?
>
> The name "blame-tree" is probably my fault, as that's what I called it
> in 2012 when I originally wrote it. I don't have access to the adjacent
> repos anymore, but I _think_ it was replacing a script that was in fact
> called "git-last-modified" or something like that. So it all comes
> around. ;)
>
> The debate has mostly been over "blame" here. But I think "tree" is also
> inaccurate. Theoretically it can be about any set of paths in the repo,
> not just the entries of a single tree. So:
>
> git last-modified Makefile Documentation/Makefile t/Makefile
>
> would be a perfectly valid thing to ask about (and of course a
> pathspec like '**Makefile' would be a simpler way to do so). The word
> "tree" was there because the original use case at GitHub was getting
> those values for all of the entries in a particular tree.
I like "git last-modified". It's name is very telling and it does just
what it says.
> But conceptually it is just about expanding a pathspec into a set of
> paths, and then traversing and reporting the last time each path was
> modified. It _almost_ fits into the "git-log" family, which is all about
> traversing and pathspecs. The output is a bit different, but I almost
> wonder if it would work as an option to continuously limit the pathspec.
> Something like:
>
> $ git log --format=%H --last-modified --raw '**Makefile'
> 89d557b950c7a0581c12452e8f9576c45546246b
> :100644 100644 13f9062a05 c4d21ccd3d M Makefile
> [ skip a bunch of commits that touched only Makefile, nothing else ]
> a7fa5b2f0ccb567a5a6afedece113f207902fa6f
> :100644 100644 6485d40f62 b109d25e9c M Documentation/Makefile
> [ skip more; now this one is interesting, because one commit touches a
> bunch of files! It also touches Documentation/Makefile, but we'd
> have already narrowed our pathspec to forget about it by this point ]
> 5309c1e9fb399c390ed36ef476e91f76f6746fa9
> :100644 100644 3e67552cc5 97ce9c92fb M contrib/credential/libsecret/Makefile
> :100644 100644 238f5f8c36 0948297e20 M contrib/credential/osxkeychain/Makefile
> :100644 100644 6e992c0866 5b795fc9fe M contrib/credential/wincred/Makefile
> :100644 100644 f2be7cc924 33c2ccc9f7 M contrib/diff-highlight/Makefile
> :100644 100644 5ff5275496 2a98541477 M contrib/diff-highlight/t/Makefile
> :100644 100644 4e603512a3 497ac434d6 M contrib/mw-to-git/Makefile
> :100644 100644 f422203fa0 6c9f377caa M contrib/mw-to-git/t/Makefile
> :100644 100644 52b84ba3d4 691737e76b M contrib/persistent-https/Makefile
> :100644 100644 093399c788 2a85f5ee84 M contrib/subtree/t/Makefile
> :100644 100644 667c39ed56 6c5a12bc32 M git-gui/Makefile
> :100644 100644 749aa2e7ec e656b0d2b0 M git-gui/po/glossary/Makefile
> :100644 100644 6911c2915a 4ff4ed0616 M t/interop/Makefile
> :100644 100644 e4808aebed 9b3090c4ed M t/perf/Makefile
> :100644 100644 bd1e9e30c1 722755338d M templates/Makefile
> [ ... end immediately without traversing further here, since all
> paths have been reported ... ]
>
> I dunno. I just made that up. The output is obviously quite different
> than blame-tree produces, but it would be easy-ish to collect it in the
> same way. And it's much more flexible, because you could use --format
> and diff options to report as much or as little about each commit as
> you'd want.
>
> It is a bit different from regular log, though, in that we'd expand the
> pathspec at the very start, rather than applying it continuously as we
> traverse (otherwise we could never end early, since we'd never know if
> there was a "foo/Makefile" deep in history).
That's the biggest downside from my point of view: it works quite
differently, so we can expect that many of the options that git-log(1)
accepts wouldn't make sense at all. From my point of view we already
have too many commands where we have different "modes" hidden behind
options. They are hard to discover, and in theory you have to manually
mark all incompatible options as such, which is bound to grow stale.
> So you could argue that "git last-modified" could also just take
> format and diff output options. ;)
But this one I agree with -- if we had git-last-modified(1), then it
would eventually make sense to have at least `--format`. I don't have a
use case for diff output options, but if any come up it could probably
be added at a later point, as well.
Patrick
next prev parent reply other threads:[~2025-05-16 4:38 UTC|newest]
Thread overview: 135+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 17:46 [PATCH RFC 0/5] Introduce git-blame-tree(1) command Toon Claes
2025-04-22 17:46 ` [PATCH RFC 1/5] blame-tree: introduce new subcommand to blame files Toon Claes
2025-04-24 16:19 ` Junio C Hamano
2025-05-07 13:13 ` Toon Claes
2025-04-22 17:46 ` [PATCH RFC 2/5] t/perf: add blame-tree perf script Toon Claes
2025-04-22 17:46 ` [PATCH RFC 3/5] blame-tree: use Bloom filters when available Toon Claes
2025-04-22 17:46 ` [PATCH RFC 4/5] blame-tree: implement faster algorithm Toon Claes
2025-04-22 17:46 ` [PATCH RFC 5/5] blame-tree.c: initialize revision machinery without walk Toon Claes
2025-04-23 13:26 ` [PATCH RFC 0/5] Introduce git-blame-tree(1) command Marc Branchaud
2025-05-07 14:22 ` Toon Claes
2025-05-07 20:23 ` Marc Branchaud
2025-05-07 20:45 ` Junio C Hamano
2025-05-08 13:26 ` Marc Branchaud
2025-05-08 14:26 ` Junio C Hamano
2025-05-08 15:12 ` Marc Branchaud
2025-05-14 14:42 ` Toon Claes
2025-05-14 19:29 ` Junio C Hamano
2025-05-14 21:15 ` Marc Branchaud
2025-05-15 13:29 ` Patrick Steinhardt
2025-05-15 16:39 ` Junio C Hamano
2025-05-15 17:39 ` Marc Branchaud
2025-05-15 19:30 ` Jeff King
2025-05-16 4:38 ` Patrick Steinhardt [this message]
2025-05-20 8:49 ` Toon Claes
2025-05-15 17:30 ` Marc Branchaud
2025-05-16 4:30 ` Patrick Steinhardt
2025-05-14 21:15 ` Marc Branchaud
2025-05-07 20:49 ` Kristoffer Haugsbakk
2025-05-08 13:20 ` D. Ben Knoble
2025-05-08 13:26 ` Marc Branchaud
2025-05-08 13:18 ` D. Ben Knoble
2025-05-23 9:33 ` [PATCH RFC v2 0/5] Introduce git-last-modified(1) command Toon Claes
2025-05-23 9:33 ` [PATCH RFC v2 1/5] last-modified: new subcommand to show when files were last modified Toon Claes
2025-05-25 20:07 ` Justin Tobler
2025-06-05 8:32 ` Toon Claes
2025-05-27 10:39 ` Patrick Steinhardt
2025-06-13 9:34 ` Toon Claes
2025-06-13 9:52 ` Kristoffer Haugsbakk
2025-05-23 9:33 ` [PATCH RFC v2 2/5] t/perf: add last-modified perf script Toon Claes
2025-05-23 9:33 ` [PATCH RFC v2 3/5] last-modified: use Bloom filters when available Toon Claes
2025-05-27 10:40 ` Patrick Steinhardt
2025-06-13 11:05 ` Toon Claes
2025-05-23 9:33 ` [PATCH RFC v2 4/5] last-modified: implement faster algorithm Toon Claes
2025-05-27 10:39 ` Patrick Steinhardt
2025-05-23 9:33 ` [PATCH RFC v2 5/5] last-modified: initialize revision machinery without walk Toon Claes
2025-05-27 10:39 ` Patrick Steinhardt
2025-07-01 20:35 ` [PATCH RFC v2 0/5] Introduce git-last-modified(1) command Kristoffer Haugsbakk
2025-07-01 21:06 ` Junio C Hamano
2025-07-01 21:30 ` Kristoffer Haugsbakk
2025-07-02 13:00 ` Toon Claes
2025-07-09 15:53 ` Toon Claes
2025-07-09 17:00 ` Junio C Hamano
2025-06-30 18:49 ` [PATCH RFC v3 0/3] " Toon Claes
2025-06-30 18:49 ` [PATCH RFC v3 1/3] last-modified: new subcommand to show when files were last modified Toon Claes
2025-07-01 20:20 ` Kristoffer Haugsbakk
2025-07-02 11:51 ` Junio C Hamano
2025-06-30 18:49 ` [PATCH RFC v3 2/3] t/perf: add last-modified perf script Toon Claes
2025-06-30 18:49 ` [PATCH RFC v3 3/3] last-modified: use Bloom filters when available Toon Claes
2025-07-01 23:01 ` [PATCH RFC v3 0/3] Introduce git-last-modified(1) command Junio C Hamano
2025-07-09 15:26 ` [PATCH v4 " Toon Claes
2025-07-09 21:57 ` Junio C Hamano
2025-07-10 18:37 ` Junio C Hamano
2025-07-16 13:32 ` [PATCH v5 0/6] " Toon Claes
2025-07-16 13:35 ` [PATCH v5 1/6] last-modified: new subcommand to show when files were last modified Toon Claes
2025-07-18 0:02 ` Taylor Blau
2025-07-19 6:44 ` Jeff King
2025-07-22 15:50 ` Toon Claes
2025-08-01 9:09 ` Christian Couder
2025-08-01 16:59 ` Junio C Hamano
2025-07-16 13:35 ` [PATCH v5 2/6] t/perf: add last-modified perf script Toon Claes
2025-07-18 0:08 ` Taylor Blau
2025-07-22 15:52 ` Toon Claes
2025-07-16 13:35 ` [PATCH v5 3/6] last-modified: use Bloom filters when available Toon Claes
2025-07-18 0:16 ` Taylor Blau
2025-07-22 16:02 ` Toon Claes
2025-07-16 13:35 ` [PATCH v5 4/6] pretty: allow caller to disable indentation Toon Claes
2025-07-16 15:50 ` Junio C Hamano
2025-07-17 16:31 ` Toon Claes
2025-07-16 13:35 ` [PATCH v5 5/6] last-modified: support --extended format Toon Claes
2025-07-16 16:09 ` Junio C Hamano
2025-07-17 16:31 ` Toon Claes
2025-07-17 22:37 ` Junio C Hamano
2025-07-18 17:36 ` Junio C Hamano
2025-07-22 16:06 ` Toon Claes
2025-07-16 13:42 ` [PATCH v5 6/6] fixup! last-modified: use Bloom filters when available Toon Claes
2025-07-17 23:39 ` [PATCH v5 0/6] Introduce git-last-modified(1) command Taylor Blau
2025-07-22 15:35 ` Toon Claes
2025-07-30 17:59 ` Toon Claes
2025-07-31 7:45 ` Patrick Steinhardt
2025-07-30 17:55 ` [PATCH v6 0/4] " Toon Claes
2025-07-31 18:40 ` Junio C Hamano
2025-07-31 23:57 ` Junio C Hamano
2025-08-05 9:33 ` [PATCH v7 0/3] " Toon Claes
2025-08-05 14:34 ` Patrick Steinhardt
2025-08-05 16:21 ` Junio C Hamano
2025-08-05 16:34 ` Junio C Hamano
2025-08-05 16:55 ` Toon Claes
2025-08-05 17:20 ` Jean-Noël AVILA
2025-08-05 21:46 ` Junio C Hamano
2025-08-06 12:01 ` Toon Claes
2025-08-06 15:38 ` Junio C Hamano
2025-08-28 22:44 ` Junio C Hamano
2025-08-05 18:28 ` Junio C Hamano
2025-08-05 9:33 ` [PATCH v7 1/3] last-modified: new subcommand to show when files were last modified Toon Claes
2025-08-05 9:33 ` [PATCH v7 2/3] t/perf: add last-modified perf script Toon Claes
2025-08-05 9:33 ` [PATCH v7 3/3] last-modified: use Bloom filters when available Toon Claes
2025-07-30 17:55 ` [PATCH v6 1/4] last-modified: new subcommand to show when files were last modified Toon Claes
2025-07-31 6:42 ` Patrick Steinhardt
2025-08-01 16:22 ` Toon Claes
2025-08-01 17:09 ` Junio C Hamano
2025-08-04 6:34 ` Patrick Steinhardt
2025-08-04 17:14 ` Junio C Hamano
2025-08-05 5:35 ` Toon Claes
2025-08-01 20:34 ` Jean-Noël AVILA
2025-08-05 5:36 ` Toon Claes
2025-08-04 6:33 ` Patrick Steinhardt
2025-08-01 10:18 ` Christian Couder
2025-08-01 10:22 ` Patrick Steinhardt
2025-08-01 17:06 ` Junio C Hamano
2025-08-02 8:18 ` Christian Couder
2025-08-02 11:31 ` Christian Couder
2025-08-02 13:38 ` Christian Couder
2025-08-02 16:26 ` Junio C Hamano
2025-08-04 6:35 ` Patrick Steinhardt
2025-07-30 17:55 ` [PATCH v6 2/4] t/perf: add last-modified perf script Toon Claes
2025-07-30 17:55 ` [PATCH v6 3/4] commit-graph: export prepare_commit_graph() Toon Claes
2025-07-31 6:42 ` Patrick Steinhardt
2025-07-30 17:55 ` [PATCH v6 4/4] last-modified: use Bloom filters when available Toon Claes
2025-07-31 6:43 ` Patrick Steinhardt
2025-08-01 16:23 ` Toon Claes
2025-08-04 6:33 ` Patrick Steinhardt
2025-07-09 15:26 ` [PATCH v4 1/3] last-modified: new subcommand to show when files were last modified Toon Claes
2025-07-09 15:26 ` [PATCH v4 2/3] t/perf: add last-modified perf script Toon Claes
2025-07-09 15:26 ` [PATCH v4 3/3] last-modified: use Bloom filters when available Toon Claes
2025-07-16 13:35 ` [PATCH v5 6/6] fixup! " Toon Claes
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=aCbBKj7O9LjO3SMK@pks.im \
--to=ps@pks.im \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=marcnarc@xiplink.com \
--cc=me@ttaylorr.com \
--cc=peff@peff.net \
--cc=stolee@gmail.com \
--cc=toon@iotcl.com \
/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).