{"thread":{"id":"361","subject":"[PATCH (take 2)] Use diff-tree -p instead of \"git diff\" in git-export.","startedAt":"2005-04-27T23:18:30Z","lastAt":"2005-04-27T23:18:30Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"1932","messageId":"7vsm1bdd15.fsf@assigned-by-dhcp.cox.net","threadId":"361","inReplyTo":null,"subject":"[PATCH (take 2)] Use diff-tree -p instead of \"git diff\" in git-export.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-27T23:18:30Z","receivedAt":"2005-04-27T23:18:30Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Now diff-tree can produce patch itself, there is no reason to\ndepend on Cogito to show diff in the git-export output anymore.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\nThis is a reworked patch---we just made -p to imply recursive so\nwe can just say diff-tree -p, not diff-tree -p -r like I said in\nthe previous patch.\n\ngit-export.c |    2 +-\n1 files changed, 1 insertion(+), 1 deletion(-)\n\n--- k/git-export.c\n+++ l/git-export.c\n@@ -18,7 +18,7 @@ void show_commit(struct commit *commit)\n \t\tchar *against = sha1_to_hex(commit->parents->item->object.sha1);\n \t\tprintf(\"\\n\\n======== diff against %s ========\\n\", against);\n \t\tfflush(NULL);\n-\t\tsprintf(cmdline, \"git diff -r %s:%s\", against, hex);\n+\t\tsprintf(cmdline, \"diff-tree -p %s %s\", against, hex);\n \t\tsystem(cmdline);\n \t}\n \tprintf(\"======== end ========\\n\\n\");\n\n"}]}