]> git.ipfire.org Git - thirdparty/git.git/commitdiff
last-modified: clarify in the docs the command takes a pathspec
authorToon Claes <toon@iotcl.com>
Tue, 20 Jan 2026 21:47:08 +0000 (22:47 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Jan 2026 22:13:04 +0000 (14:13 -0800)
The documentation mentions git-last-modified(1) takes `<path>...`, but
that argument actually accepts a pathspec. Reword the documentation to
reflect that.

Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-last-modified.adoc
builtin/last-modified.c

index 602843e09598a52bf6a8d506f3359f08e9bd39ce..7c3fd844b8eca5b31dfb9cfc06a642e517b1fd25 100644 (file)
@@ -9,7 +9,8 @@ git-last-modified - EXPERIMENTAL: Show when files were last modified
 SYNOPSIS
 --------
 [synopsis]
-git last-modified [--recursive] [--show-trees] [<revision-range>] [[--] <path>...]
+git last-modified [--recursive] [--show-trees]
+                 [<revision-range>] [[--] <pathspec>...]
 
 DESCRIPTION
 -----------
@@ -39,10 +40,10 @@ OPTIONS
        spell `<revision-range>`, see the 'Specifying Ranges' section of
        linkgit:gitrevisions[7].
 
-`[--] <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.
+`[--] <pathspec>...`::
+       Show the commit that last modified each path matching _<pathspec>_.
+       If no _<pathspec>_ is given, all files and subdirectories are included.
+       See linkgit:gitglossary[7] for details on pathspec syntax.
 
 SEE ALSO
 --------
index b0ecbdc5400d137b7e147c8f91f43210cf8236e0..781495f597652eb9644c544256fb6f2467eb644a 100644 (file)
@@ -510,8 +510,8 @@ int cmd_last_modified(int argc, const char **argv, const char *prefix,
        struct last_modified lm = { 0 };
 
        const char * const last_modified_usage[] = {
-               N_("git last-modified [--recursive] [--show-trees] "
-                  "[<revision-range>] [[--] <path>...]"),
+               N_("git last-modified [--recursive] [--show-trees]\n"
+                  "                  [<revision-range>] [[--] <pathspec>...]"),
                NULL
        };