From: Junio C Hamano <gitster@pobox.com>
To: Tamir Duberstein <tamird@gmail.com>
Cc: git@vger.kernel.org, "Jean-Noël Avila" <jn.avila@free.fr>
Subject: Re: [PATCH v3] doc: clarify --follow and log.follow for git log
Date: Mon, 11 May 2026 09:46:35 +0900 [thread overview]
Message-ID: <xmqqh5oewz6c.fsf@gitster.g> (raw)
In-Reply-To: <CAJ-ks9krzLO_+O74omAfeVByUBh=rDGSVSarf5PGwkdWepzubw@mail.gmail.com> (Tamir Duberstein's message of "Sun, 10 May 2026 20:32:29 -0400")
Tamir Duberstein <tamird@gmail.com> writes:
>> Undefined behaviour can change without notice, and users should be
>> strongly discouraged from using it. Describing what the current
>> implementation happens to do moves us exactly in the opposite
>> direction.
>>
>> `--follow` is a checkbox feature. You can use it "only with a single
>> filename on a linear history" or all bets are off otherwise.
>>
>> That is what we should describe if we want to be honest.
>
> At the very least the documentation should state this...?
Sure.
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.
next prev parent reply other threads:[~2026-05-11 0:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-05-11 1:28 ` Tamir Duberstein
2026-05-11 2:06 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqh5oewz6c.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jn.avila@free.fr \
--cc=tamird@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox