mirror of
https://github.com/git/git
synced 2024-08-25 10:45:59 +00:00
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.
This commit is contained in:
parent
057c7d3018
commit
d6db01075b
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue