From: Linus Torvalds Date: Sat, 21 May 2005 22:42:53 +0000 (-0700) Subject: diff-tree: don't print multiple headers for merges when silent. X-Git-Tag: v0.99~510 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d6db01075b65da2b8584a0450619390893aae103;p=git.git diff-tree: don't print multiple headers for merges when silent. Normally we show every facet of a merge, but when we're silent, there's little point. --- diff --git a/diff-tree.c b/diff-tree.c index 73aa1496e..68186484b 100644 --- a/diff-tree.c +++ b/diff-tree.c @@ -414,8 +414,15 @@ static int diff_tree_commit(const unsigned char *commit, const char *name) return -1; header = generate_header(name, sha1_to_hex(parent), buf, size); diff_tree_sha1_top(parent, commit, ""); - if (!header && verbose_header) + if (!header && verbose_header) { header_prefix = "\ndiff-tree "; + /* + * Don't print multiple merge entries if we + * don't print the diffs. + */ + if (silent) + break; + } offset += 48; } return 0;