From: Junio C Hamano Date: Fri, 27 Jun 2008 01:12:47 +0000 (-0700) Subject: Merge branch 'maint' X-Git-Tag: v1.6.0-rc0~200 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c0f5c69c680395a45294184dcf0923cea530b9af?ds=inline;hp=-c Merge branch 'maint' * maint: GIT 1.5.5.5 GIT 1.5.4.6 git-shell: accept "git foo" form diff --check: do not discard error status upon seeing a good line --- c0f5c69c680395a45294184dcf0923cea530b9af diff --combined diff.c index 44e8790690,f281c5b82a..893942359b --- a/diff.c +++ b/diff.c @@@ -928,8 -928,7 +928,8 @@@ static void show_stats(struct diffstat_ total = add + del; } show_name(options->file, prefix, name, len, reset, set); - fprintf(options->file, "%5d ", added + deleted); + fprintf(options->file, "%5d%s", added + deleted, + added + deleted ? " " : ""); show_graph(options->file, '+', add, add_c, reset); show_graph(options->file, '-', del, del_c, reset); fprintf(options->file, "\n"); @@@ -1151,12 -1150,14 +1151,14 @@@ static void checkdiff_consume(void *pri char *err; if (line[0] == '+') { + unsigned bad; data->lineno++; - data->status = check_and_emit_line(line + 1, len - 1, + bad = check_and_emit_line(line + 1, len - 1, data->ws_rule, NULL, NULL, NULL, NULL); - if (!data->status) + if (!bad) return; - err = whitespace_error_string(data->status); + data->status |= bad; + err = whitespace_error_string(bad); fprintf(data->file, "%s:%d: %s.\n", data->filename, data->lineno, err); free(err); emit_line(data->file, set, reset, line, 1);