Re: "git diff" surprising default output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Sergey Organov <sorganov@xxxxxxxxx> writes:
>
>> I figured the offender is --indent-heuristic that is described in the
>> manual as:
>>
>>       Enable the heuristic that shifts diff hunk boundaries to make
>>       patches easier to read. This is the default.
>>
>> but apparently rather makes patches harder to read, at least at some
>> conditions. Turning it off helps to get the expected result:
>
> As a heuristic, it is not surprising that it has some corner cases
> where it does not shine.  I think the version that was eventually
> merged starts here
>
>   https://lore.kernel.org/git/cover.1473068229.git.mhagger@xxxxxxxxxxxx/
>
> and we should be able to find a few links to the original
> observation that motivated the change, e.g.
>
>   https://public-inbox.org/git/cover.1470259583.git.mhagger@xxxxxxxxxxxx/

Thanks a lot for the references!

>From what I briefly read there it apparently follows that it'd shine at
regular C code, yet won't shine at preprocessor directives that are
usually out of regular alignment.

It'd be nice to improve this, but I'm not sure it's a simple thing to
fix, or even at all possible, though maybe it'd help to somehow favoring
chunks that start and end at the same alignment?

Or maybe it's just plain bug in the implementation?

Thanks,
-- Sergey Organov



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux