summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f245194)
raw | patch | inline | side by side (parent: f245194)
author | Junio C Hamano <gitster@pobox.com> | |
Sat, 23 May 2009 08:15:35 +0000 (01:15 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 29 Jul 2009 17:22:39 +0000 (10:22 -0700) |
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>
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>
builtin-log.c | patch | blob | history | |
builtin-rev-list.c | patch | blob | history | |
diff-lib.c | patch | blob | history | |
diff.c | patch | blob | history | |
diff.h | patch | blob | history | |
revision.c | patch | blob | history | |
tree-diff.c | patch | blob | history |
diff --git a/builtin-log.c b/builtin-log.c
index 0c2fa0ae2dc3f23cd52d2e8d765805b07262a7d6..7903e5a78f80b55c94b8824260eb21ee95ff1b93 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
get_patch_filename(commit, rev->nr, fmt_patch_suffix, &filename);
- if (!DIFF_OPT_TST(&rev->diffopt, QUIET))
+ if (!DIFF_OPT_TST(&rev->diffopt, QUICK))
fprintf(realstdout, "%s\n", filename.buf + outdir_offset);
if (freopen(filename.buf, "w", stdout) == NULL)
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 4ba1c12e0b6fedb056aebed6ffc8f8bb8d6cfd18..69753dc2060677103f79496c382d2331849c28e5 100644 (file)
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
memset(&info, 0, sizeof(info));
info.revs = &revs;
- quiet = DIFF_OPT_TST(&revs.diffopt, QUIET);
+ quiet = DIFF_OPT_TST(&revs.diffopt, QUICK);
for (i = 1 ; i < argc; i++) {
const char *arg = argv[i];
diff --git a/diff-lib.c b/diff-lib.c
index ad2a4cde74e0c2ec6367a7128aa0732f131f6bdf..b7813af614bc62b563201e22fe0e2bceb2d13833 100644 (file)
--- a/diff-lib.c
+++ b/diff-lib.c
struct cache_entry *ce = active_cache[i];
int changed;
- if (DIFF_OPT_TST(&revs->diffopt, QUIET) &&
+ if (DIFF_OPT_TST(&revs->diffopt, QUICK) &&
DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES))
break;
init_revisions(&rev, NULL);
setup_revisions(0, NULL, &rev, def);
- DIFF_OPT_SET(&rev.diffopt, QUIET);
+ DIFF_OPT_SET(&rev.diffopt, QUICK);
DIFF_OPT_SET(&rev.diffopt, EXIT_WITH_STATUS);
rev.diffopt.flags |= diff_flags;
run_diff_index(&rev, 1);
index 467925d931550219a2dbfc5897180dca61ca2fc7..91d6ea21a9d3575ea940e3d71e42609e800bed6b 100644 (file)
--- a/diff.c
+++ b/diff.c
* 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);
}
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"))
index 538e4f0d8ff6a51cabd4e23f6f6ba80e31e527f5..a7e7ccbd4230ca5cc65ea7e9255ecc345eb8f169 100644 (file)
--- a/diff.h
+++ b/diff.h
#define DIFF_OPT_COLOR_DIFF (1 << 8)
#define DIFF_OPT_COLOR_DIFF_WORDS (1 << 9)
#define DIFF_OPT_HAS_CHANGES (1 << 10)
-#define DIFF_OPT_QUIET (1 << 11)
+#define DIFF_OPT_QUICK (1 << 11)
#define DIFF_OPT_NO_INDEX (1 << 12)
#define DIFF_OPT_ALLOW_EXTERNAL (1 << 13)
#define DIFF_OPT_EXIT_WITH_STATUS (1 << 14)
diff --git a/revision.c b/revision.c
index 9f5dac5f1d8a8a654a2ab77e8e26fb134c7e36fa..b8afc7c2b56263135a416253a2afb93a2f12940d 100644 (file)
--- a/revision.c
+++ b/revision.c
revs->ignore_merges = 1;
revs->simplify_history = 1;
DIFF_OPT_SET(&revs->pruning, RECURSIVE);
- DIFF_OPT_SET(&revs->pruning, QUIET);
+ DIFF_OPT_SET(&revs->pruning, QUICK);
revs->pruning.add_remove = file_add_remove;
revs->pruning.change = file_change;
revs->lifo = 1;
diff --git a/tree-diff.c b/tree-diff.c
index 7c526d33f4d5a5c625ff0524880526a817cdbd0f..7d745b44061955ced9ce4624a498647a1d8d32a5 100644 (file)
--- a/tree-diff.c
+++ b/tree-diff.c
@@ -286,7 +286,7 @@ int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, stru
int baselen = strlen(base);
for (;;) {
- if (DIFF_OPT_TST(opt, QUIET) &&
+ if (DIFF_OPT_TST(opt, QUICK) &&
DIFF_OPT_TST(opt, HAS_CHANGES))
break;
if (opt->nr_paths) {