summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/sequencer.c b/sequencer.c
index b7289c93d4..8f3836c479 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -4619,22 +4619,13 @@ int todo_list_write_to_file(struct repository *r, struct todo_list *todo_list,
const char *file, const char *shortrevisions,
const char *shortonto, int num, unsigned flags)
{
- int edit_todo = !(shortrevisions && shortonto), res;
+ int res;
struct strbuf buf = STRBUF_INIT;
todo_list_to_strbuf(r, todo_list, &buf, num, flags);
-
- if (flags & TODO_LIST_APPEND_TODO_HELP) {
- int command_count = count_commands(todo_list);
- if (!edit_todo) {
- strbuf_addch(&buf, '\n');
- strbuf_commented_addf(&buf, Q_("Rebase %s onto %s (%d command)",
- "Rebase %s onto %s (%d commands)",
- command_count),
- shortrevisions, shortonto, command_count);
- }
- append_todo_help(edit_todo, flags & TODO_LIST_KEEP_EMPTY, &buf);
- }
+ if (flags & TODO_LIST_APPEND_TODO_HELP)
+ append_todo_help(flags & TODO_LIST_KEEP_EMPTY, count_commands(todo_list),
+ shortrevisions, shortonto, &buf);
res = write_message(buf.buf, buf.len, file, 0);
strbuf_release(&buf);