Hi Christian, On Mon, Mar 14, 2016 at 9:43 PM, Christian Couder <christian.couder@xxxxxxxxx> wrote: > On Sat, Mar 12, 2016 at 11:46 AM, Paul Tan <pyokagan@xxxxxxxxx> wrote: >> In an interactive rebase, commands are read and executed from a todo >> list (.git/rebase-merge/git-rebase-todo) to perform the rebase. >> >> In the upcoming re-implementation of git-rebase -i in C, it is useful to >> be able to parse each command into a data structure which can then be >> operated on. Implement rebase_todo_item for this. > > sequencer.{c,h} already has some code to parse and create todo lists > for cherry-picking or reverting multiple commits, so I am wondering if > it would be possible to share some code? AFAIK, sequencer.c as it is in master parses the todo list destructively and does not keep the associated action for each commit and the "rest" string. interactive rebase does keep those, so I needed a different data structure rather than the one currently being used in sequencer.c. As I said in another thread, originally I wanted to keep the scope simple, and just do the rewrite of rebase from C to shell, and let any further libifications and optimizations come after, so I didn't want to touch sequencer for now. However, it turns out that Dscho has grand plans for the unification of sequencer and interactive rebase, so I'll go with that :-) Regards, Paul -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html