Re: Fix revision log diff setup, avoid unnecessary diff generation
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 13 quoted lines
> On Sat, 29 Sep 2007, Pierre Habouzit wrote:
>>
>> - if (strcmp(argv[i], "-z"))
>> - revs->diff = 1;
>> + revs->diff = strcmp(argv[i], "-z")
>> + && strcmp(argv[i], "--color")
>> + && strcmp(argv[i], "--no-color");
>
> The old code was already pretty damn ugly, the new code is worse (never
> mind the bug).
>
> I don't think we should care *at*all* about the actual argument string, we
> should just look at what the diffopts end up being at the end.
Thanks, I think this is the sanest thing to do.