diff --git a/log-tree.c b/log-tree.c
index 5505606ed6a292cadf1a04ea0b1abc2ca93e3c09..30cd5bb22800f5e897c1170e97721a4dcdb9c9d2 100644 (file)
--- a/log-tree.c
+++ b/log-tree.c
extra_headers = subject_buffer;
snprintf(buffer, sizeof(buffer) - 1,
- "--%s%s\n"
+ "\n--%s%s\n"
"Content-Type: text/x-patch;"
" name=\"%s.diff\"\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -432,7 +432,7 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
struct commit_list *parents;
unsigned const char *sha1 = commit->object.sha1;
- if (!opt->diff)
+ if (!opt->diff && !DIFF_OPT_TST(&opt->diffopt, EXIT_WITH_STATUS))
return 0;
/* Root commit? */