Thread (3 messages) 3 messages, 3 authors, 2025-08-05

Re: [PATCH v7 0/3] Introduce git-last-modified(1) command

From: Junio C Hamano <hidden>
Date: 2025-08-05 16:35:01

Toon Claes [off-list ref] writes:
Changes in v7:
- Fix case when bloom filters were used and a commit range was given. This bug
  was uncovered in CI.
- Rename the long option for `-t` to `--show-trees`. This option no longer
  implies option `-r`. And resemble these changes in the documentation, with a
  few other small documentation tweaks.
- Move prepare_commit_graph() into get_bloom_filter_settings() which no longer
  requires last-modified to worry about it itself. This is similar to
  repo_find_commit_pos_in_graph() and lookup_commit_in_graph()
- Bring back the call to commit_graph_generation() in maybe_changed_path(). This
  is also called in the same function in blame.c and in
  check_maybe_different_in_bloom_filter() in revision.c. I couldn't find a test
  case that triggers this exit condition, but it should not have negative
  side-effects.
- No longer call diff_free() on the copy we make when populating the `paths` of
  `struct last_modified`. Because we weren't doing a deep copy, this could clean
  up fields used later on by the original. Instead only call clear_pathspec(). A
  comment to clarify this mechanism better is added.
- Add BUG() call to exit condition that shouldn't happen.
- Switch some int types to bool types.
I am happy with the updates, but am wondering if documentation
update along the lines of attached patch is also needed.  I am not
sure about the last two, i.e. things that are not dash+option
appearing as enumeration labels, though (and Cc'ing Jean-Noël to ask
for help).

Thanks.


 Documentation/git-last-modified.adoc | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git c/Documentation/git-last-modified.adoc w/Documentation/git-last-modified.adoc
index 35bd4a1dd0..602843e095 100644
--- c/Documentation/git-last-modified.adoc
+++ w/Documentation/git-last-modified.adoc
@@ -22,24 +22,24 @@ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
 OPTIONS
 -------
 
--r::
---recursive::
+`-r`::
+`--recursive`::
 	Instead of showing tree entries, step into subtrees and show all entries
 	inside them recursively.
 
--t::
---show-trees::
+`-t`::
+`--show-trees`::
 	Show tree entries even when recursing into them. It has no effect
 	without `--recursive`.
 
-<revision-range>::
+`<revision-range>`::
 	Only traverse commits in the specified revision range. When no
 	`<revision-range>` is specified, it defaults to `HEAD` (i.e. the whole
 	history leading to the current commit). For a complete list of ways to
 	spell `<revision-range>`, see the 'Specifying Ranges' section of
 	linkgit:gitrevisions[7].
 
-[--] <path>...::
+`[--] <path>...`::
 	For each _<path>_ given, the commit which last modified it is returned.
 	Without an optional path parameter, all files and subdirectories
 	in path traversal the are included in the output.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help