Re: [PATCH 10/16] fast-import: use skip_prefix for parsing input

2014-06-20 Thread Eric Sunshine
On Fri, Jun 20, 2014 at 1:45 AM, Jeff King p...@peff.net wrote: On Thu, Jun 19, 2014 at 11:19:09PM -0400, Eric Sunshine wrote: - if (starts_with(command_buf.buf, M )) - file_change_m(b); - else if (starts_with(command_buf.buf, D )) -

Re: [PATCH 10/16] fast-import: use skip_prefix for parsing input

2014-06-19 Thread Eric Sunshine
On Wed, Jun 18, 2014 at 3:49 PM, Jeff King p...@peff.net wrote: Fast-import does a lot of parsing of commands and dispatching to sub-functions. For example, given option foo, we might recognize option using starts_with, and then hand it off to parse_option() to do the rest. However, we do

Re: [PATCH 10/16] fast-import: use skip_prefix for parsing input

2014-06-19 Thread Jeff King
On Thu, Jun 19, 2014 at 11:19:09PM -0400, Eric Sunshine wrote: - if (starts_with(command_buf.buf, M )) - file_change_m(b); - else if (starts_with(command_buf.buf, D )) - file_change_d(b); - else if

[PATCH 10/16] fast-import: use skip_prefix for parsing input

2014-06-18 Thread Jeff King
Fast-import does a lot of parsing of commands and dispatching to sub-functions. For example, given option foo, we might recognize option using starts_with, and then hand it off to parse_option() to do the rest. However, we do not let parse_option know that we have parsed the first part already.