summaryrefslogtreecommitdiff
path: root/diff-tree.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-21 22:42:53 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-21 22:42:53 (GMT)
commitd6db01075b65da2b8584a0450619390893aae103 (patch)
tree050e39834a3a5c41c35b039271e6a35bcbe7a12c /diff-tree.c
parent057c7d30183672d6ef96a9f3e87860058e1c08f8 (diff)
downloadgit-d6db01075b65da2b8584a0450619390893aae103.zip
git-d6db01075b65da2b8584a0450619390893aae103.tar.gz
git-d6db01075b65da2b8584a0450619390893aae103.tar.bz2
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.
Diffstat (limited to 'diff-tree.c')
-rw-r--r--diff-tree.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/diff-tree.c b/diff-tree.c
index 73aa149..6818648 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;