Re: [PATCH 2/5] diff: allow --patch to override -s/--no-patch

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

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> Junio C Hamano <gitster@xxxxxxxxx> writes:
>
>> I am wondering if the difference after this patch between "-p" and
>> "-U8" is deliberate, or just an accident coming from the way the
>> original was written in ee1e5412 (git diff: support "-U" and
>> "--unified" options properly, 2006-05-13).
>
> No, it isn't. I just didn't notice the -U case.
>
>> If the original were written in this way:
>>
>> 	if (!strcmp(arg, "-p") || !strcmp(arg, "-u") || !strcmp(arg, "--patch") ||
>>             opt_arg(arg, 'U', "unified", &options->context))
>>   		options->output_format |= DIFF_FORMAT_PATCH;
>
> Yes, this seems to be a better way.
>
> There are other cases like --patch-with-raw, I'll send a reroll.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]