Re: [PATCH 11/26] diff.c: emit_diff_symbol learns DIFF_SYMBOL_FILEPAIR

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

 



On Mon, 19 Jun 2017 19:48:01 -0700
Stefan Beller <sbeller@xxxxxxxxxx> wrote:

> @@ -676,6 +677,14 @@ static void emit_diff_symbol(struct diff_options *o, enum diff_symbol s,
>  		}
>  		emit_line(o, context, reset, line, len);
>  		break;
> +	case DIFF_SYMBOL_FILEPAIR:
> +		meta = diff_get_color_opt(o, DIFF_METAINFO);
> +		reset = diff_get_color_opt(o, DIFF_RESET);
> +		fprintf(o->file, "%s%s%s%s%s%s\n", diff_line_prefix(o), meta,
> +			flags ? "+++ " : "--- ",

I think that a constant should be defined for this flag, just like for
content lines. If not it is not immediately obvious that a flag should
be set for the +++ lines.

> +			line, reset,
> +			strchr(line, ' ') ? "\t" : "");
> +		break;
>  	default:
>  		die("BUG: unknown diff symbol");
>  	}



[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