Re: [PATCH 1/1] range-diff: let '--abbrev' option takes effect

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

 



Teng Long <dyroneteng@xxxxxxxxx> writes:

> diff --git a/range-diff.c b/range-diff.c
> index 8255ab43..086365df 100644
> --- a/range-diff.c
> +++ b/range-diff.c
> @@ -383,11 +383,14 @@ static void output_pair_header(struct diff_options *diffopt,
>  	const char *color_new = diff_get_color_opt(diffopt, DIFF_FILE_NEW);
>  	const char *color_commit = diff_get_color_opt(diffopt, DIFF_COMMIT);
>  	const char *color;
> +	char abbrev = diffopt->abbrev;
> +
> +	if (abbrev < 0)
> +		abbrev = DEFAULT_ABBREV;

OK.  I _think_ this explicit defaulting to DEFAULT_ABBREV does not
need to exist, as find_unique_abbrev() falls back to the default
when given a negative value anyway, but it is good to be explicit.

Will queue.  Thanks.



[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