diff: Rename QUIET internal option to QUICK
The option "QUIET" primarily meant "find if we have _any_ difference as quick as possible and report", which means we often do not even have to look at blobs if we know the trees are different by looking at the higher level (e.g. "diff-tree A B"). As a side effect, because there is no point showing one change that we happened to have found first, it also enables NO_OUTPUT and EXIT_WITH_STATUS options, making the end result look quiet. Rename the internal option to QUICK to reflect this better; it also makes grepping the source tree much easier, as there are other kinds of QUIET option everywhere. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
4
diff.c
4
diff.c
@ -2452,7 +2452,7 @@ int diff_setup_done(struct diff_options *options)
|
||||
* to have found. It does not make sense not to return with
|
||||
* exit code in such a case either.
|
||||
*/
|
||||
if (DIFF_OPT_TST(options, QUIET)) {
|
||||
if (DIFF_OPT_TST(options, QUICK)) {
|
||||
options->output_format = DIFF_FORMAT_NO_OUTPUT;
|
||||
DIFF_OPT_SET(options, EXIT_WITH_STATUS);
|
||||
}
|
||||
@ -2643,7 +2643,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
|
||||
else if (!strcmp(arg, "--exit-code"))
|
||||
DIFF_OPT_SET(options, EXIT_WITH_STATUS);
|
||||
else if (!strcmp(arg, "--quiet"))
|
||||
DIFF_OPT_SET(options, QUIET);
|
||||
DIFF_OPT_SET(options, QUICK);
|
||||
else if (!strcmp(arg, "--ext-diff"))
|
||||
DIFF_OPT_SET(options, ALLOW_EXTERNAL);
|
||||
else if (!strcmp(arg, "--no-ext-diff"))
|
||||
|
Reference in New Issue
Block a user