[PATCH] Do not print header in diff-tree --root unless asked to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently cg-log -f is broken (shows sha1 in files list for the initial
commit) since git-diff-tree would always return the sha1 of the commit
when --root was passed. I assume it should do this only when -v was also
passed; I'm certain that I don't want it when processing the output.

Signed-off-by: Petr Baudis <pasky@xxxxxxx>
---

 diff-tree.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/diff-tree.c b/diff-tree.c
index f55a35a..8d82b5b 100644
--- a/diff-tree.c
+++ b/diff-tree.c
@@ -107,7 +107,8 @@ static int diff_tree_commit(struct commi
 
 	/* Root commit? */
 	if (show_root_diff && !commit->parents) {
-		header = generate_header(sha1, NULL, commit);
+		if (verbose_header)
+			header = generate_header(sha1, NULL, commit);
 		diff_root_tree(sha1, "");
 	}
 
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]