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

[PATCH v4 7/8] sequencer: reencode old merge-commit message

From: Doan Tran Cong Danh <hidden>
Date: 2019-11-07 02:56:42
Subsystem: the rest · Maintainer: Linus Torvalds

During rebasing, old merge's message (encoded in old encoding)
will be used as message for new merge commit (created by rebase).

In case of the value of i18n.commitencoding has been changed after the
old merge time. We will receive an unusable message for this new merge.

Correct it.

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 833a928929..d735d09f98 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3374,7 +3374,8 @@ static int do_merge(struct repository *r,
 	}
 
 	if (commit) {
-		const char *message = get_commit_buffer(commit, NULL);
+		const char *encoding = get_commit_output_encoding();
+		const char *message = logmsg_reencode(commit, NULL, encoding);
 		const char *body;
 		int len;
 
-- 
2.24.0.8.g36796e2b67
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help