diff mbox series

[v6,5/9] sequencer: reencode revert/cherry-pick's todo list

Message ID 23f9de4527a15e1b4b0e9ee32e5603d970a9c3b2.1573452046.git.congdanhqx@gmail.com (mailing list archive)
State New, archived
Headers show
Series sequencer: handle other encoding better | expand

Commit Message

Đoàn Trần Công Danh Nov. 11, 2019, 6:03 a.m. UTC
Keep revert/cherry-pick's todo list in line with rebase todo list.

Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
---
 sequencer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sequencer.c b/sequencer.c
index 05403a9005..6ab1bba39d 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -2562,14 +2562,17 @@  static int walk_revs_populate_todo(struct todo_list *todo_list,
 	enum todo_command command = opts->action == REPLAY_PICK ?
 		TODO_PICK : TODO_REVERT;
 	const char *command_string = todo_command_info[command].str;
+	const char *encoding;
 	struct commit *commit;
 
 	if (prepare_revs(opts))
 		return -1;
 
+	encoding = get_log_output_encoding();
+
 	while ((commit = get_revision(opts->revs))) {
 		struct todo_item *item = append_new_todo(todo_list);
-		const char *commit_buffer = get_commit_buffer(commit, NULL);
+		const char *commit_buffer = logmsg_reencode(commit, NULL, encoding);
 		const char *subject;
 		int subject_len;