From: Junio C Hamano Date: Mon, 18 May 2009 15:59:54 +0000 (-0700) Subject: Merge branch 'mh/diff-stat-color' X-Git-Tag: v1.6.4-rc0~159 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c16cea73451f95954b970d34e1120f87dae052c8?ds=inline;hp=-c Merge branch 'mh/diff-stat-color' * mh/diff-stat-color: diff: do not color --stat output like patch context --- c16cea73451f95954b970d34e1120f87dae052c8 diff --combined diff.c index 363dcb9613,d581d4d9ff..c67ef63c55 --- a/diff.c +++ b/diff.c @@@ -839,10 -839,9 +839,9 @@@ static int scale_linear(int it, int wid } static void show_name(FILE *file, - const char *prefix, const char *name, int len, - const char *reset, const char *set) + const char *prefix, const char *name, int len) { - fprintf(file, " %s%s%-*s%s |", set, prefix, len, name, reset); + fprintf(file, " %s%-*s |", prefix, len, name); } static void show_graph(FILE *file, char ch, int cnt, const char *set, const char *reset) @@@ -876,7 -875,7 +875,7 @@@ static void fill_print_name(struct diff file->print_name = pname; } -static void show_stats(struct diffstat_t* data, struct diff_options *options) +static void show_stats(struct diffstat_t *data, struct diff_options *options) { int i, len, add, del, adds = 0, dels = 0; int max_change = 0, max_len = 0; @@@ -956,7 -955,7 +955,7 @@@ } if (data->files[i]->is_binary) { - show_name(options->file, prefix, name, len, reset, set); + show_name(options->file, prefix, name, len); fprintf(options->file, " Bin "); fprintf(options->file, "%s%d%s", del_c, deleted, reset); fprintf(options->file, " -> "); @@@ -966,7 -965,7 +965,7 @@@ continue; } else if (data->files[i]->is_unmerged) { - show_name(options->file, prefix, name, len, reset, set); + show_name(options->file, prefix, name, len); fprintf(options->file, " Unmerged\n"); continue; } @@@ -988,7 -987,7 +987,7 @@@ add = scale_linear(add, width, max_change); del = scale_linear(del, width, max_change); } - show_name(options->file, prefix, name, len, reset, set); + show_name(options->file, prefix, name, len); fprintf(options->file, "%5d%s", added + deleted, added + deleted ? " " : ""); show_graph(options->file, '+', add, add_c, reset); @@@ -996,8 -995,8 +995,8 @@@ fprintf(options->file, "\n"); } fprintf(options->file, - "%s %d files changed, %d insertions(+), %d deletions(-)%s\n", - set, total_files, adds, dels, reset); + " %d files changed, %d insertions(+), %d deletions(-)\n", + total_files, adds, dels); } static void show_shortstats(struct diffstat_t* data, struct diff_options *options) @@@ -1025,7 -1024,7 +1024,7 @@@ total_files, adds, dels); } -static void show_numstat(struct diffstat_t* data, struct diff_options *options) +static void show_numstat(struct diffstat_t *data, struct diff_options *options) { int i;