path: root/sequencer.c
diff options
authorDoan Tran Cong Danh <>2019-11-11 06:03:40 (GMT)
committerJunio C Hamano <>2019-11-11 09:03:35 (GMT)
commit5772b0c745ea7f57b94880f377e84a79e2675f38 (patch)
treebdbdb79cf27c31d9bc34ba399fdf3d8caee0e4eb /sequencer.c
parentb375744274113889c85bee69445375ce51e96648 (diff)
sequencer: reencode old merge-commit message
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. This change also notice a breakage with git-rebase label system. Signed-off-by: Doan Tran Cong Danh <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'sequencer.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/sequencer.c b/sequencer.c
index 833a928..d735d09 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;