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>
This commit is contained in:
committed by
Junio C Hamano
parent
5772b0c745
commit
52f52e5ae4
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user