Re: [PATCH v3 1/3] diff: add --word-diff option that generalizes --color-words

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

 



Junio C Hamano wrote:
> Thomas Rast <trast@xxxxxxxxxxxxxxx> writes:
[...]
> > +	{ DIFF_WORDS_COLOR,
> > +	  {"", "", NULL},
> > +	  {"", "", NULL},
> > +	  {"", "", NULL},
> > +	  "\n"
> > +	}
> > +};
> 
> Beautiful.
> 
> The style might be a bit iffy.  Shouldn't an opening "{", unless closed on
> the same line with a matching "}", stand on its own line?

Perhaps.  OTOH I just noticed I could also drop the NULL (and let the
implicit 0-padding take over) which makes every style fit on a single
line.  That should make it a bit easier to read.

> > +static int fn_out_diff_words_write_helper(FILE *fp,
> > +					  struct diff_words_style_elem st_el,
> 
> Do you need to pass this by value?

No, thanks for catching this.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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]