diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-09-29 16:49:40 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-29 16:49:40 -0700 |
commit | 7b7e977b9625d0e5a4d4aa9fa6ffb62f083cbb6b (patch) | |
tree | 1174cfcefb42f55ad952efb319d2582e2537b125 /builtin | |
parent | 08d0f7a5317d80cbb93f80791f2759fb6aec890f (diff) | |
parent | 480871e09ed2e5275b4ba16b278681e5a8c122ae (diff) | |
download | git-7b7e977b9625d0e5a4d4aa9fa6ffb62f083cbb6b.tar.gz git-7b7e977b9625d0e5a4d4aa9fa6ffb62f083cbb6b.tar.xz |
Merge branch 'jt/format-patch-base-info-above-sig' into maint
"git format-patch --base=..." feature that was recently added
showed the base commit information after "-- " e-mail signature
line, which turned out to be inconvenient. The base information
has been moved above the signature line.
* jt/format-patch-base-info-above-sig:
format-patch: show base info before email signature
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/log.c b/builtin/log.c index 92dc34dcb..cd9c4a46d 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1042,7 +1042,6 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout, diff_flush(&opts); fprintf(rev->diffopt.file, "\n"); - print_signature(rev->diffopt.file); } static const char *clean_message_id(const char *msg_id) @@ -1361,7 +1360,7 @@ static void print_bases(struct base_tree_info *bases, FILE *file) return; /* Show the base commit */ - fprintf(file, "base-commit: %s\n", oid_to_hex(&bases->base_commit)); + fprintf(file, "\nbase-commit: %s\n", oid_to_hex(&bases->base_commit)); /* Show the prerequisite patches */ for (i = bases->nr_patch_id - 1; i >= 0; i--) @@ -1720,6 +1719,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) make_cover_letter(&rev, use_stdout, origin, nr, list, branch_name, quiet); print_bases(&bases, rev.diffopt.file); + print_signature(rev.diffopt.file); total++; start_number--; } @@ -1779,13 +1779,13 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) if (!use_stdout) rev.shown_one = 0; if (shown) { + print_bases(&bases, rev.diffopt.file); if (rev.mime_boundary) fprintf(rev.diffopt.file, "\n--%s%s--\n\n\n", mime_boundary_leader, rev.mime_boundary); else print_signature(rev.diffopt.file); - print_bases(&bases, rev.diffopt.file); } if (!use_stdout) fclose(rev.diffopt.file); |