summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorDoan Tran Cong Danh <congdanhqx@gmail.com>2019-11-11 06:03:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-11-11 09:03:35 (GMT)
commit5772b0c745ea7f57b94880f377e84a79e2675f38 (patch)
treebdbdb79cf27c31d9bc34ba399fdf3d8caee0e4eb /sequencer.c
parentb375744274113889c85bee69445375ce51e96648 (diff)
downloadgit-5772b0c745ea7f57b94880f377e84a79e2675f38.zip
git-5772b0c745ea7f57b94880f377e84a79e2675f38.tar.gz
git-5772b0c745ea7f57b94880f377e84a79e2675f38.tar.bz2
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 <congdanhqx@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c3
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;