Hi Junio,

On Tue, 13 Dec 2016, Junio C Hamano wrote:

> Johannes Schindelin <johannes.schinde...@gmx.de> writes:
> 
> > @@ -395,7 +414,10 @@ static int do_recursive_merge(struct commit *base, 
> > struct commit *next,
> >  
> >     if (active_cache_changed &&
> >         write_locked_index(&the_index, &index_lock, COMMIT_LOCK))
> > -           /* TRANSLATORS: %s will be "revert" or "cherry-pick" */
> > +           /*
> > +            * TRANSLATORS: %s will be "revert", "cherry-pick" or
> > +            * "rebase -i".
> > +            */
> 
> IIRC, the "TRANSLATORS:" comment has to deviate from our coding
> style due to tool limitation and has to be done like this:
> 
> > +           /* TRANSLATORS: %s will be "revert", "cherry-pick" or
> > +            * "rebase -i".
> > +            */

Aargh. I had fixed that in another patch series already, but failed to do
so in this here patch series. Sorry.

Fixed.

> > @@ -1204,6 +1226,9 @@ static int save_todo(struct todo_list *todo_list, 
> > struct replay_opts *opts)
> >     const char *todo_path = get_todo_path(opts);
> >     int next = todo_list->current, offset, fd;
> >  
> > +   if (is_rebase_i(opts))
> > +           next++;
> > +
> 
> This is because...?  Everybody else counts 0-based while rebase-i
> counts from 1 or something?

No. Since its conception, edit-patch-series.sh (the artist now known as
rebase -i) processed each line of the "todo script" by writing a new
"todo" file, skipping the first line, and appending it to the "done" file.

The sequencer chooses to write the new "insn sheet" after a successful
operation.

This is not an option for rebase -i, as it has many error paths and it was
simply impossible to express "save the todo script in case of failure" in
shell script.

I added a comment to clarify why the current command is not written to
git-rebase-todo.

Ciao,
Dscho

Reply via email to