diff options
author | Doan Tran Cong Danh <congdanhqx@gmail.com> | 2019-11-11 06:03:41 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-11-11 09:03:35 (GMT) |
commit | 52f52e5ae4937de2bc798828c47c49f469b2cc85 (patch) | |
tree | 3297cc63e543a51340b998999e0673fbf7dfa40e /sequencer.c | |
parent | 5772b0c745ea7f57b94880f377e84a79e2675f38 (diff) | |
download | git-52f52e5ae4937de2bc798828c47c49f469b2cc85.zip git-52f52e5ae4937de2bc798828c47c49f469b2cc85.tar.gz git-52f52e5ae4937de2bc798828c47c49f469b2cc85.tar.bz2 |
sequencer: reencode commit message for am/rebase --show-current-patch
The message file will be used as commit message for the
git-{am,rebase} --continue.
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r-- | sequencer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c index d735d09..4d12ad3 100644 --- a/sequencer.c +++ b/sequencer.c @@ -2972,7 +2972,8 @@ static int make_patch(struct repository *r, strbuf_addf(&buf, "%s/message", get_dir(opts)); if (!file_exists(buf.buf)) { - const char *commit_buffer = get_commit_buffer(commit, NULL); + const char *encoding = get_commit_output_encoding(); + const char *commit_buffer = logmsg_reencode(commit, NULL, encoding); find_commit_subject(commit_buffer, &subject); res |= write_message(subject, strlen(subject), buf.buf, 1); unuse_commit_buffer(commit, commit_buffer); |