{"thread":{"id":"3727","subject":"[PATCH] Do not print header in diff-tree --root unless asked to","startedAt":"2006-03-25T23:28:07Z","lastAt":"2006-03-26T01:50:24Z","messageCount":3,"participants":["Petr Baudis","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"17957","messageId":"20060325232807.9146.12846.stgit@machine.or.cz","threadId":"3727","inReplyTo":null,"subject":"[PATCH] Do not print header in diff-tree --root unless asked to","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-03-25T23:28:07Z","receivedAt":"2006-03-25T23:28:07Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Currently cg-log -f is broken (shows sha1 in files list for the initial\ncommit) since git-diff-tree would always return the sha1 of the commit\nwhen --root was passed. I assume it should do this only when -v was also\npassed; I'm certain that I don't want it when processing the output.\n\nSigned-off-by: Petr Baudis <pasky@suse.cz>\n---\n\n diff-tree.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/diff-tree.c b/diff-tree.c\nindex f55a35a..8d82b5b 100644\n--- a/diff-tree.c\n+++ b/diff-tree.c\n@@ -107,7 +107,8 @@ static int diff_tree_commit(struct commi\n \n \t/* Root commit? */\n \tif (show_root_diff && !commit->parents) {\n-\t\theader = generate_header(sha1, NULL, commit);\n+\t\tif (verbose_header)\n+\t\t\theader = generate_header(sha1, NULL, commit);\n \t\tdiff_root_tree(sha1, \"\");\n \t}\n \n"},{"id":"17962","messageId":"7vu09mt4ij.fsf@assigned-by-dhcp.cox.net","threadId":"3727","inReplyTo":"20060325232807.9146.12846.stgit@machine.or.cz","subject":"Re: [PATCH] Do not print header in diff-tree --root unless asked to","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-03-26T00:48:36Z","receivedAt":"2006-03-26T00:48:36Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> ... git-diff-tree would always return the sha1 of the commit\n> when --root was passed.\n\nI am not sure why this change is needed.\n\nThe output from \"git-diff-tree --root e83c51\" (the very initial\n\"git\") and \"git-diff-tree 8bc9a0\" (the second commit) without\nany other parameters (specifically, there is no '-v') look\ncomparable right now, but I suspect this change would break it.\n"},{"id":"17970","messageId":"20060326015024.GC18185@pasky.or.cz","threadId":"3727","inReplyTo":"7vu09mt4ij.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Do not print header in diff-tree --root unless asked to","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-03-26T01:50:24Z","receivedAt":"2006-03-26T01:50:24Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sun, Mar 26, 2006 at 01:48:36AM CET, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> Petr Baudis <pasky@suse.cz> writes:\n> \n> > ... git-diff-tree would always return the sha1 of the commit\n> > when --root was passed.\n> \n> I am not sure why this change is needed.\n> \n> The output from \"git-diff-tree --root e83c51\" (the very initial\n> \"git\") and \"git-diff-tree 8bc9a0\" (the second commit) without\n> any other parameters (specifically, there is no '-v') look\n> comparable right now, but I suspect this change would break it.\n\nI was confused by the fact that\n\n\tgit-diff-tree --root rev1\n\ngives a different output than\n\n\tgit-diff-tree --root rev1 rev2\n\nSorry for the noise,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nRight now I am having amnesia and deja-vu at the same time.  I think\nI have forgotten this before.\n"}]}