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

Re: Fwd: possible Improving diff algoritm

From
MWMorten Welinder <mwelinder@gmail.com>
Date
Dec 13, 2012, 01:55 UTC
Message-ID
<CANv4PNnC1J54TSpHuBOpY=rbuU_naysYkmoyi=utNF0vWK1CnA@mail.gmail.com>
In-Reply-To
<7vpq2f2az4.fsf@alter.siamese.dyndns.org>
Show 6 quoted lines
>> Is there a reason why picking among the choices in a sliding window
>> must be contents neutral?
>
> Sorry, you might be getting at something interesting but I do not
> understand the question.  I have no idea what you mean by "contents
> neutral".

I was merely asking if an algorithm to pick between the 2+ choices was allowed to look at the contents of the lines.

I.e., an algorithm would look at the C comment example and determine that the choice starting containing a full inserted comment is preferable over the one that appears to close one comment and open a new.

And the in inserted-function case it would prefer the one where the matching { and } are in correct order.

Morten
Previous: Michael HaggertyNext: Geert Bosch
Message 13 of 18 in “Fwd: possible Improving diff algoritm”
  1. KevinDec 12, 2012
  2. Junio C HamanoDec 12, 2012
  3. Brian J. MurrellDec 12, 2012
  4. KevinDec 12, 2012
  5. Junio C HamanoDec 12, 2012
  6. Morten WelinderDec 12, 2012
  7. Junio C HamanoDec 12, 2012
  8. Andrew ArdillDec 12, 2012
  9. Javier DomingoDec 12, 2012
  10. Junio C HamanoDec 12, 2012
  11. Javier DomingoDec 12, 2012
  12. Michael HaggertyDec 13, 2012
  13. Morten WelinderDec 13, 2012
  14. Geert BoschDec 13, 2012
  15. Junio C HamanoDec 13, 2012
  16. Javier DomingoDec 14, 2012
  17. Bernhard R. LinkDec 14, 2012
  18. Javier DomingoDec 15, 2012

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.