git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] doc: add documentation for git log --no-follow

From
Jeff King <peff@peff.net>
Date
Feb 1, 2020, 11:16 UTC
Message-ID
<20200201111636.GC1864948@coredump.intra.peff.net>
In-Reply-To
<85e71c97-9e0a-863e-179f-a6e1f14365ce@voucoux.fr>
On Sat, Feb 01, 2020 at 12:24:31AM +0100, Étienne Servais wrote:
> This feature was added by commit
> 076c98372e (log: add "log.follow" configuration variable, 2015-07-07)
> but remained undocumented.

That commit just touched the code; it was originally added by aebbcf5797 (diff: accept --no-follow option, 2012-09-21). But I think the general intent of your patch is still valid.

> Signed-off-by: Étienne Servais <etienne.servais@voucoux.fr>
> ---
> This is my first patch to git \o/
> Sent with thunderbird with help of format-patch'doc (So, it works!).
Yeah, everything looks good there (no whitespace damage, etc).
> I couldn't figure if I shall merge the --no-follow doc with the follow
> as is done for --no-decorate and --decorate just after.
I think it would make more sense to just put it with --follow, like:
  [--no-]follow::
which matches how --use-mailmap is defined, for instance.
Show 7 quoted lines
> @@ -205,7 +208,8 @@ log.follow::
>  	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 setting can be disabled by the `--no-follow`
> +	option.

I'm on the fence on this hunk. There are a number of config options that can be canceled or overridden by command-line options. It's a normal pattern for the "--no" variant to do so. So while it often doesn't hurt to give a pointer in the right direction, I don't know that we'd want to start doing so in every such case.

-Peff
Previous: Étienne ServaisNext: Étienne Servais
Message 2 of 5 in “doc: add documentation for git log --no-follow”
  1. doc: add documentation for git log --no-followÉtienne Servais, Jan 31, 2020
  2. Jeff KingFeb 1, 2020
  3. Étienne ServaisFeb 3, 2020
  4. index-pack: downgrade twice-resolved REF_DELTA to die()Jeff King, Feb 3, 2020
  5. Taylor BlauFeb 3, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.