Re: [showing-off RFC/PATCH 26/26] diff.c: have a "machine parseable" move coloring

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

 



Brandon Williams <bmwill@xxxxxxxxxx> writes:

> On 06/19, Stefan Beller wrote:
>> Ævar asked for it, this is how you would do it.
>> (plus documentation, tests, CLI knobs, options)
>> 
>> Signed-off-by: Stefan Beller <sbeller@xxxxxxxxxx>
>> ---
>>  diff.c | 15 +++++++++++----
>>  diff.h |  2 ++
>>  2 files changed, 13 insertions(+), 4 deletions(-)
>> 
>> diff --git a/diff.c b/diff.c
>> index 7756f7610c..61caa057ff 100644
>> --- a/diff.c
>> +++ b/diff.c
>> @@ -997,6 +997,7 @@ static void emit_diff_symbol_from_struct(struct diff_options *o,
>>  	static const char *nneof = " No newline at end of file\n";
>>  	const char *context, *reset, *set, *meta, *fraginfo;
>>  	struct strbuf sb = STRBUF_INIT;
>> +	int sign;
>
> should this be a char instead of an int?

Perhaps.  Once we start adding things other than + and -, I think
they should no longer be called "sign", though.

If Stefan chose '*' as a replacement for '+' because both makes
things larger (yes, I am a positive person and my numbers are all
positive), probably the replacement for '-' should be '/' (or '%'),
not '_'.  But that is just bikeshedding.




[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