Git development
 help / color / mirror / Atom feed
* [PATCH] doc: git-log: document --no-follow
@ 2026-05-07 14:14 Tamir Duberstein
  2026-05-07 18:13 ` [PATCH v2] doc: git-log: clarify --follow options Tamir Duberstein
  0 siblings, 1 reply; 14+ messages in thread
From: Tamir Duberstein @ 2026-05-07 14:14 UTC (permalink / raw)
  To: git; +Cc: Jean-Noël Avila, Junio C Hamano, Tamir Duberstein

The --no-follow option was added by aebbcf5797 (diff: accept --no-follow
option, 2012-09-21), but git-log(1) only documents the positive --follow
form.

Later, 076c98372e (log: add "log.follow" configuration variable,
2015-07-07) taught git log to act as if --follow were given when
log.follow is true and there is a single path, with --no-follow
overriding that default. 1e9250b5aa (diff-parseopt: convert
--[no-]follow, 2019-03-05) preserved the negated form while moving the
option to parse-options.

Document --no-follow alongside --follow, and mention the override in the
log.follow documentation.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 Documentation/config/log.adoc | 2 +-
 Documentation/git-log.adoc    | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/config/log.adoc b/Documentation/config/log.adoc
index f20cc25cd7..58147dff9b 100644
--- a/Documentation/config/log.adoc
+++ b/Documentation/config/log.adoc
@@ -54,7 +54,7 @@ This is the same as the `--decorate` option of the `git log`.
 	If `true`, `git log` will act as if the `--follow` option was used when
 	a single <path> is given.  This has the same limitations as `--follow`,
 	i.e. it cannot be used to follow multiple files and does not work well
-	on non-linear history.
+	on non-linear history.  This can be overridden by `--no-follow`.
 
 `log.graphColors`::
 	A list of colors, separated by commas, that can be used to draw
diff --git a/Documentation/git-log.adoc b/Documentation/git-log.adoc
index e304739c5e..58a2be60a1 100644
--- a/Documentation/git-log.adoc
+++ b/Documentation/git-log.adoc
@@ -28,8 +28,11 @@ OPTIONS
 -------
 
 `--follow`::
+`--no-follow`::
 	Continue listing the history of a file beyond renames
-	(works only for a single file).
+	(works only for a single file).  `--no-follow` disables this
+	behavior, including when it was enabled by the `log.follow`
+	configuration variable.
 
 `--no-decorate`::
 `--decorate[=(short|full|auto|no)]`::

---
base-commit: 94f057755b7941b321fd11fec1b2e3ca5313a4e0
change-id: 20260507-document-log-no-follow-72c33dc15017

Best regards,
--  
Tamir Duberstein <tamird@gmail.com>


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-05-11  2:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 14:14 [PATCH] doc: git-log: document --no-follow Tamir Duberstein
2026-05-07 18:13 ` [PATCH v2] doc: git-log: clarify --follow options Tamir Duberstein
2026-05-10 21:31   ` Junio C Hamano
2026-05-10 22:30     ` Tamir Duberstein
2026-05-10 23:48       ` Junio C Hamano
2026-05-10 23:51         ` Tamir Duberstein
2026-05-10 22:31   ` [PATCH v3] doc: clarify --follow and log.follow for git log Tamir Duberstein
2026-05-10 23:53     ` Junio C Hamano
2026-05-11  0:07       ` Tamir Duberstein
2026-05-11  0:13         ` Junio C Hamano
2026-05-11  0:32           ` Tamir Duberstein
2026-05-11  0:46             ` Junio C Hamano
2026-05-11  1:28               ` Tamir Duberstein
2026-05-11  2:06                 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox