aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorToon Claes <toon@iotcl.com>2026-01-20 22:47:10 +0100
committerJunio C Hamano <gitster@pobox.com>2026-01-20 14:13:04 -0800
commit9bfaf78cb28b26ab0538e2edd2229547d6be962f (patch)
treec0ba644078ebb23879dae5226948761a2fcf1779 /Documentation
parent209574de2d2ab0a264522c8c44c3eebb6d03ec43 (diff)
downloadgit-9bfaf78cb28b26ab0538e2edd2229547d6be962f.tar.xz
last-modified: document option '--max-depth'
Option --max-depth is supported by git-last-modified(1), because it was added to the diff machinery in a1dfa5448d (diff: teach tree-diff a max-depth parameter, 2025-08-07). This option is useful for everyday use of the git-last-modified(1) command, so document it's existence in the man page. To have it also appear in the help output of `git last-modified -h`, move the handling of '--max-depth' to parse_options() in builtin/last-modified.c itself. This prepares for the change in default behavior in the next commit. Signed-off-by: Toon Claes <toon@iotcl.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-last-modified.adoc8
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/git-last-modified.adoc b/Documentation/git-last-modified.adoc
index 3760fd33a1..6f9b119bb6 100644
--- a/Documentation/git-last-modified.adoc
+++ b/Documentation/git-last-modified.adoc
@@ -9,7 +9,7 @@ git-last-modified - EXPERIMENTAL: Show when files were last modified
SYNOPSIS
--------
[synopsis]
-git last-modified [--recursive] [--show-trees] [-z]
+git last-modified [--recursive] [--show-trees] [--max-depth=<depth>] [-z]
[<revision-range>] [[--] <pathspec>...]
DESCRIPTION
@@ -33,6 +33,12 @@ OPTIONS
Show tree entries even when recursing into them. It has no effect
without `--recursive`.
+`--max-depth=<depth>`::
+ For each pathspec given on the command line, traverse at most `<depth>`
+ levels into subtrees. A negative value means no limit.
+ The default is 0, which shows all paths matching the pathspec
+ without descending into subtrees.
+
`-z`::
Terminate each line with a _NUL_ character rather than a newline.