X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=log-tree.c;h=30cd5bb22800f5e897c1170e97721a4dcdb9c9d2;hb=5190d73d1e83d6ac982da2a793043c2b012fad40;hp=5505606ed6a292cadf1a04ea0b1abc2ca93e3c09;hpb=4ace4fc584f48d5b8df957c4462cf5c7c58ab100;p=git.git diff --git a/log-tree.c b/log-tree.c index 5505606ed..30cd5bb22 100644 --- a/log-tree.c +++ b/log-tree.c @@ -198,7 +198,7 @@ void log_write_email_headers(struct rev_info *opt, const char *name, 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? */