threads / discuss / 51646

Is diff.indentHeuristic still experimental?

Subject: Is diff.indentHeuristic still experimental?

## tl;dr

4 messages between Aug 15, 2019 and Aug 15, 2019.

replies: 3people: 4as markdown or json

Hong Xu· Aug 15, 2019, 04:38 UTC · lore
Hi all,

I saw that diff.indentHeuristic was enabled by default at 33de7163879ca83be7d6e1583c125f84e1e7c329 <https://git.kernel.org/pub/scm/git/git.git/commit/?id=33de7163879ca83be7d6e1583c125f84e1e7c329> , but the doc still says it is experimental <https://git-scm.com/docs/git-config#Documentation/git-config.txt-diffindentHeuristic>. Am I missing anything?

Best,
Hong
Hong
SZEDER Gábor· Aug 15, 2019, 09:12 UTC · re: Hong Xu · lore

[PATCH] diff: 'diff.indentHeuristic' is no longer experimental

The indent heuristic started out as experimental, but it's now our default diff heuristic since 33de716387 (diff: enable indent heuristic by default, 2017-05-08). Alas, that commit didn't update the documentation, and the description of the 'diff.indentHeuristic' configuration variable still implies that it's experimental and not the default.

Update the description of 'diff.indentHeuristic' to make it clear that it's the default diff heuristic.

The description of the related '--indent-heuristic' option has already been updated in bab76141da (diff: --indent-heuristic is no longer experimental, 2017-10-29).

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 Documentation/config/diff.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/config/diff.txt b/Documentation/config/diff.txt
index 5afb5a2cbc..ff09f1cf73 100644
--- a/Documentation/config/diff.txt
+++ b/Documentation/config/diff.txt
@@ -189,7 +189,7 @@ diff.guitool::
 include::../mergetools-diff.txt[]
 
 diff.indentHeuristic::
-	Set this option to `true` to enable experimental heuristics
+	Set this option to `false` to disable the default heuristics
 	that shift diff hunk boundaries to make patches easier to read.
 
 diff.algorithm::
-- 
2.23.0.rc2.366.g16015fd804
Jeff King· Aug 15, 2019, 13:56 UTC · re: SZEDER Gábor · lore

Re: [PATCH] diff: 'diff.indentHeuristic' is no longer experimental

On Thu, Aug 15, 2019 at 11:12:45AM +0200, SZEDER Gábor wrote:
Show 13 quoted lines
> The indent heuristic started out as experimental, but it's now our
> default diff heuristic since 33de716387 (diff: enable indent heuristic
> by default, 2017-05-08).  Alas, that commit didn't update the
> documentation, and the description of the 'diff.indentHeuristic'
> configuration variable still implies that it's experimental and not
> the default.
> 
> Update the description of 'diff.indentHeuristic' to make it clear that
> it's the default diff heuristic.
> 
> The description of the related '--indent-heuristic' option has already
> been updated in bab76141da (diff: --indent-heuristic is no
> longer experimental, 2017-10-29).
Yeah, this makes perfect sense.

I wondered briefly if we needed to distinguish between plumbing and porcelain here, but the config option (and its default) are the same for both.

-Peff
Junio C Hamano· Aug 15, 2019, 16:58 UTC · re: Jeff King · lore

Re: [PATCH] diff: 'diff.indentHeuristic' is no longer experimental

Jeff King <peff@peff.net> writes:
Show 17 quoted lines
> On Thu, Aug 15, 2019 at 11:12:45AM +0200, SZEDER Gábor wrote:
>
>> The indent heuristic started out as experimental, but it's now our
>> default diff heuristic since 33de716387 (diff: enable indent heuristic
>> by default, 2017-05-08).  Alas, that commit didn't update the
>> documentation, and the description of the 'diff.indentHeuristic'
>> configuration variable still implies that it's experimental and not
>> the default.
>> 
>> Update the description of 'diff.indentHeuristic' to make it clear that
>> it's the default diff heuristic.
>> 
>> The description of the related '--indent-heuristic' option has already
>> been updated in bab76141da (diff: --indent-heuristic is no
>> longer experimental, 2017-10-29).
>
> Yeah, this makes perfect sense.
OK.  Thanks, all.

← back to recent threads