Thread (79 messages) 79 messages, 6 authors, 2019-11-11
STALE2416d
Revisions (2)
  1. v3 current
  2. v4 [diff vs current]

[PATCH v3 8/8] sequencer: reencode commit message for am/rebase --show-current-patch

From: Doan Tran Cong Danh <hidden>
Date: 2019-11-06 09:20:56
Subsystem: the rest · Maintainer: Linus Torvalds

The message file will be used as commit message for the
git-{am,rebase} --continue.

Signed-off-by: Doan Tran Cong Danh <redacted>
---
 sequencer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
index d735d09f98..4c1ffad0f1 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);
-- 
2.24.0.4.g6a51fdd29c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help