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

Re: [PATCH v3] doc: clarify --follow and log.follow for git log

From
Junio C Hamano <gitster@pobox.com>
Date
May 11, 2026, 02:06 UTC
Message-ID
<xmqqwlxavgwv.fsf@gitster.g>
In-Reply-To
<CAJ-ks9n=DcwqyP7K_q0Ki6_3_+o5=558FK1DKr0+VyiM7q69EA@mail.gmail.com>
Tamir Duberstein <tamird@gmail.com> writes:
Show 25 quoted lines
>> Doesn't the current text for the option
>>
>>         `--follow`::
>>                 Continue listing the history of a file beyond renames
>>                 (works only for a single file).
>>
>> pretty much cover that, though?  The configuration side is a bit
>> more verbose but essentially says the same thing, I think.
>>
>>         `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.
>>
>> We do not say anything about what the feature happens to do when it
>> is given a non-linear history whose branches each rename to the same
>> final name that you start following from in the more recent part of
>> the history, either, and stop at saying "does not work well".  We
>> should treat that case the same way as the case where the user gives
>> a pathspec with multiple pathspec elements or a pathspec that
>> matches with a directory.
>
> Sorry, I was unclear. I was saying that the documentation should be
> explicit about the cases that constitute "undefined behavior".
Ah, I see.

I am not sure. This is not the only case where we have left these unspecified things unsaid, is it? I am not sure if it is worth singling out this particular case.

Thanks.
Previous: Tamir DubersteinNext: Tamir Duberstein
Message 14 of 18 in “doc: git-log: document --no-follow”
  1. doc: git-log: document --no-followTamir Duberstein, May 7, 2026
  2. doc: git-log: clarify --follow optionsTamir Duberstein, May 7, 2026
  3. Junio C HamanoMay 10, 2026
  4. Tamir DubersteinMay 10, 2026
  5. Junio C HamanoMay 10, 2026
  6. Tamir DubersteinMay 10, 2026
  7. doc: clarify --follow and log.follow for git logTamir Duberstein, May 10, 2026
  8. Junio C HamanoMay 10, 2026
  9. Tamir DubersteinMay 11, 2026
  10. Junio C HamanoMay 11, 2026
  11. Tamir DubersteinMay 11, 2026
  12. Junio C HamanoMay 11, 2026
  13. Tamir DubersteinMay 11, 2026
  14. Junio C HamanoMay 11, 2026
  15. doc: clarify --follow and log.follow for git logTamir Duberstein, Jun 25, 2026
  16. Junio C HamanoJun 25, 2026
  17. doc: clarify --follow's single-file limitationTamir Duberstein, Sep 26, 2026
  18. Marat KhaliliSep 28, 2026

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.