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

Re: [PATCH] diff: prefer indent heuristic over compaction heuristic

From
Jacob Keller <jacob.keller@gmail.com>
Date
Dec 23, 2016, 08:12 UTC
Message-ID
<CA+P7+xrWsCkABzpSkYJ4fb2_JijmUx=Sf4Hgsr6Z+k=_GogE_Q@mail.gmail.com>
In-Reply-To
<20161223072201.zw2lwkdcs6qmb4rp@sigill.intra.peff.net>
On Thu, Dec 22, 2016 at 11:22 PM, Jeff King <peff@peff.net> wrote:
Show 34 quoted lines
> On Thu, Dec 22, 2016 at 01:12:12PM -0800, Junio C Hamano wrote:
>
>> Jacob Keller <jacob.keller@gmail.com> writes:
>>
>> > I don't think we have too many config options that interact in this
>> > way, so I understand that "last writing of a particular configuration"
>> > makes sense, but interactions between configs is something that would
>> > have never occurred to me. I'll send a patch to drop the compaction
>> > heuristic since I think we're all 100% in agreement that it is
>> > superseded by the new configuration (as no case has been shown where
>> > the new one is worse than compaction, and most show it to be better).
>>
>> If I recall correctly, we agreed that we'll drop the implementation
>> of compaction, but use the name --compaction-heuristics to trigger
>> the new and improved "indent heuristics":
>>
>>     <20161101205916.d74n6lhgp2hexpzr@sigill.intra.peff.net>
>
> FWIW, I was swayed in the other direction by later messages in the
> thread. Especially your noting that the "compaction" name has always
> been labeled experimental, and Michael's argument in:
>
>   http://public-inbox.org/git/8dbbd28b-af60-5e66-ae27-d7cddca233dc@alum.mit.edu/
>
> I.e., we could keep calling it "--indent-heuristic", and probably drop
> the other heuristic entirely as a failed experiment.
>
> I can live with it either way, but since I am being quoted as the source
> of the suggestion, I feel like that's an invitation to add my 2 cents. :)
>
> Liberal quoting below since I am adding Michael to the cc list.
>
> -Peff
>

I actually would prefer that we just say "this is the default now" and provide some knob "no-indent-heuristic" or "no-compaction-heuristic" and go with that, I think, since I am pretty sure we're all in agreement that the heuristic is an improvement in almost every case, certainly all the ones we've found. It's at least not worse in any case I've seen, and is usually better.

Thoughts? I don't have a super strong opinion about which name we went with for the knob.

Thanks, Jake

Previous: Jeff KingNext: Jeff King
Message 8 of 17 in “diff: prefer indent heuristic over compaction heuristic”
  1. diff: prefer indent heuristic over compaction heuristicJacob Keller, Dec 17, 2016
  2. Junio C HamanoDec 17, 2016
  3. Jacob KellerDec 17, 2016
  4. Junio C HamanoDec 22, 2016
  5. Jacob KellerDec 22, 2016
  6. Junio C HamanoDec 22, 2016
  7. Jeff KingDec 23, 2016
  8. Jacob KellerDec 23, 2016
  9. Jeff KingDec 23, 2016
  10. Junio C HamanoDec 23, 2016
  11. Junio C HamanoDec 23, 2016
  12. Jeff KingDec 23, 2016
  13. Jacob KellerDec 23, 2016
  14. Michael HaggertyDec 24, 2016
  15. Stefan BellerApr 27, 2017
  16. Jeff KingApr 28, 2017
  17. Martin LiškaApr 28, 2017

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.