From 68aacb2f3ceef528ded945b510094918bfe3cb37 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 14 Mar 2007 11:12:13 -0700 Subject: diff --quiet This adds the command line option 'quiet' to tell 'git diff-*' that we are not interested in the actual diff contents but only want to know if there is any change. This option automatically turns --exit-code on, and turns off output formatting, as it does not make much sense to show the first hit we happened to have found. The --quiet option is silently turned off (but --exit-code is still in effect, so is silent output) if postprocessing filters such as pickaxe and diff-filter are used. For all practical purposes I do not think of a reason to want to use these filters and not viewing the diff output. The backends have not been taught about the option with this patch. That is a topic for later rounds. Signed-off-by: Junio C Hamano --- diff.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index 81fa265656..a0d2ce1399 100644 --- a/diff.h +++ b/diff.h @@ -57,6 +57,8 @@ struct diff_options { find_copies_harder:1, color_diff:1, color_diff_words:1, + has_changes:1, + quiet:1, exit_with_status:1; int context; int break_opt; @@ -72,8 +74,6 @@ struct diff_options { const char *msg_sep; const char *stat_sep; long xdl_opts; - /* 0 - no differences; only meaningful if exit_with_status set */ - int has_changes; int stat_width; int stat_name_width; -- cgit v1.3