Re: Fwd: possible Improving diff algoritm
- From
Andrew Ardill <andrew.ardill@gmail.com>
- Date
- Dec 12, 2012, 22:34 UTC
- Message-ID
- <CAH5451=4dqqMnQa-R6O4ZrHOPSpHU9joWqf2UuOkbLtU9f8bkQ@mail.gmail.com>
- In-Reply-To
- <7vpq2f2az4.fsf@alter.siamese.dyndns.org>
On 13 December 2012 08:53, Junio C Hamano <gitster@pobox.com> wrote:
> The output being "a correct patch" is not the only thing we need to > consider, though, as I mentioned in another response to Kevin > regarding the "consequences".
The main benefit of picking a more 'natural' diff is a usability one. I know that when a chunk begins and ends one line after the logical break point (typically with braces in my experience) mentally parsing the diff becomes significantly harder. If there was a way to teach git where it should try and break out a chunk (potentially per filetype?) this is a good thing for readability, and I think would outweigh any temporary pain with regards to cached rerere and diff data.
Regards,
Andrew Ardill