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

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

From
Jeff King <peff@peff.net>
Date
Apr 30, 2016, 03:06 UTC
Message-ID
<20160430030620.GB25719@sigill.intra.peff.net>
In-Reply-To
<CAGZ79kZu=keNaCbt4T=CzH3i9qr+BxXw6AiWR-q1Cs4U80Jzng@mail.gmail.com>
On Fri, Apr 29, 2016 at 03:35:54PM -0700, Stefan Beller wrote:
Show 14 quoted lines
> > -- >8 --
> > diff: enable "compaction heuristics" and lose experimentation knob
> >
> > It seems that the new "find a good hunk boundary by locating a blank
> > line" heuristics gives much more pleasant result without much
> > noticeable downsides.  Let's make it the new algorithm for real,
> > without the opt-out knob we added while experimenting with it.
> 
> I would remove the opt-out knob much later in the game, i.e.
> 
>     1) make a patch that removes the documentation only
>        before the next release (i.e. before 2.9)
>     2) make a patch to remove the actual (unlabeled) knobs,
>         merge into master before 2.10 (i.e. just after the 2.9 release)

Yeah, I think it might be a good idea to keep some sort of undocumented safety valve in the release, at least for a cycle or two. The heuristic won't _really_ see wide use until it is in a released version of git, as much as we would like it to be otherwise.

So I am anticipating a possible conversation where somebody reports that the new output looks bad, and it would be nice to say "try it with this flag (or environment variable, or whatever) and see if that looks better". And then based on that conversation we can decide what the right next is (a real user-visible flag, or reversion, or deciding the user's case isn't worth it). Or maybe if we're lucky that conversation never happens.

The "whatever" in the instructions can obviously be "build with this patch" or "try with an older version of git", but we're a lot more likely to get a good response if it's easy for the user to do.

-Peff
Previous: Jacob Keller
Message 19 of 19 in “[PATCHv5 0/2] xdiff: implement empty line chunk heuristic”
  1. Stefan BellerApr 19, 2016
  2. 1/2 xdiff: add recs_match helper functionStefan Beller, Apr 19, 2016
  3. 2/2 xdiff: implement empty line chunk heuristicStefan Beller, Apr 19, 2016
  4. Junio C HamanoApr 19, 2016
  5. Jeff KingApr 20, 2016
  6. Jeff KingApr 20, 2016
  7. Stefan BellerApr 20, 2016
  8. Junio C HamanoApr 29, 2016
  9. Jacob KellerApr 29, 2016
  10. Junio C HamanoApr 29, 2016
  11. Stefan BellerApr 29, 2016
  12. Keller, Jacob EApr 29, 2016
  13. Stefan BellerApr 29, 2016
  14. Keller, Jacob EApr 29, 2016
  15. Junio C HamanoMay 2, 2016
  16. Stefan BellerMay 2, 2016
  17. Jeff KingMay 2, 2016
  18. Jacob KellerMay 3, 2016
  19. Jeff KingApr 30, 2016

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.