Subject: Re: [PATCH v3 07/25] sequencer: completely revamp the "todo" script parsing

From: Johannes Schindelin <[email-masked]>
Date: Tue, 11 Oct 2016 12:22:15 +0200 (CEST)

Hi Junio,

On Tue, 11 Oct 2016, Johannes Schindelin wrote:

> -- snipsnap --
> @@ -906,11 +904,13 @@ static int walk_revs_populate_todo(struct todo_list
> *todo_list,
>                 item->command = command;
>                 item->commit = commit;
>                 item->offset_in_buf = todo_list->buf.len;
> +               strbuf_addstr(&todo_list->buf, command);

This would be command_string instead of command, of course.

> +               strbuf_addch(&todo_list->buf, ' ');
> +               strbuf_add_unique_abbrev(&todo_list->buf,
> +                                        commit->object.oid.hash,
> +                                        DEFAULT_ABBREV);
>                 subject_len = find_commit_subject(commit_buffer, &subject);
> -               strbuf_addf(&todo_list->buf, "%s %s %.*s\n",
>                 command_string,
> -                       find_unique_abbrev(commit->object.oid.hash,
> -                               DEFAULT_ABBREV),
> -                       subject_len, subject);
> +               strbuf_add(&todo_list->buf, subject, subject_len);
>                 unuse_commit_buffer(commit, commit_buffer);
>         }
>         return 0;

Ciao,
Dscho