From: Junio C Hamano Date: Sun, 18 Mar 2007 22:48:06 +0000 (-0700) Subject: Merge branch 'ar/diff' X-Git-Tag: v1.5.1-rc1~13 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d54fe394acbad36e9d0fd960d5e10f2769a8041b;p=git.git Merge branch 'ar/diff' * ar/diff: Add tests for --quiet option of diff programs try-to-simplify-commit: use diff-tree --quiet machinery. revision.c: explain what tree_difference does Teach --quiet to diff backends. diff --quiet Remove unused diffcore_std_no_resolve Allow git-diff exit with codes similar to diff(1) --- d54fe394acbad36e9d0fd960d5e10f2769a8041b diff --cc tree-diff.c index f89b9d31e,44cde74ca..3940962e7 --- a/tree-diff.c +++ b/tree-diff.c @@@ -160,10 -160,10 +160,12 @@@ static void show_entry(struct diff_opti int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, struct diff_options *opt) { + int baselen = strlen(base); + while (t1->size | t2->size) { + if (opt->quiet && opt->has_changes) + break; - if (opt->nr_paths && t1->size && !interesting(t1, base, opt)) { + if (opt->nr_paths && t1->size && !interesting(t1, base, baselen, opt)) { update_tree_entry(t1); continue; }