Re: [PATCH v3 4/4] builtin/rebase: support running "git rebase "

2018-07-17 Thread Beat Bolli
On 17.07.18 23:49, Beat Bolli wrote: > On 06.07.18 14:08, Pratik Karki wrote: >> +static GIT_PATH_FUNC(apply_dir, "rebase-apply"); >> +static GIT_PATH_FUNC(merge_dir, "rebase-merge"); > > Maybe fix this up with > > -static GIT_PATH_FUNC(apply_dir, "rebase-apply"); > -static

Re: [PATCH v3 4/4] builtin/rebase: support running "git rebase "

2018-07-17 Thread Beat Bolli
On 06.07.18 14:08, Pratik Karki wrote: > +static GIT_PATH_FUNC(apply_dir, "rebase-apply"); > +static GIT_PATH_FUNC(merge_dir, "rebase-merge"); Maybe fix this up with -static GIT_PATH_FUNC(apply_dir, "rebase-apply"); -static GIT_PATH_FUNC(merge_dir, "rebase-merge"); +static

Re: [PATCH v3 4/4] builtin/rebase: support running "git rebase "

2018-07-07 Thread Junio C Hamano
Christian Couder writes: >> + default: >> + BUG("Unhandled rebase type %d", opts->type); >> + break; > > Nit: I think the "break;" line could be removed as the BUG() should always > exit. > > A quick grep shows that there are other places where there is a >

Re: [PATCH v3 4/4] builtin/rebase: support running "git rebase "

2018-07-07 Thread Johannes Schindelin
Hi Christian, On Sat, 7 Jul 2018, Christian Couder wrote: > On Fri, Jul 6, 2018 at 2:08 PM, Pratik Karki wrote: > > > + switch (opts->type) { > > + case REBASE_AM: > > + backend = "git-rebase--am"; > > + backend_func = "git_rebase__am"; > > +

Re: [PATCH v3 4/4] builtin/rebase: support running "git rebase "

2018-07-07 Thread Christian Couder
On Fri, Jul 6, 2018 at 2:08 PM, Pratik Karki wrote: > + switch (opts->type) { > + case REBASE_AM: > + backend = "git-rebase--am"; > + backend_func = "git_rebase__am"; > + break; > + case REBASE_INTERACTIVE: > + backend =

Re: [PATCH v3 4/4] builtin/rebase: support running "git rebase "

2018-07-06 Thread Junio C Hamano
Pratik Karki writes: > +static void add_var(struct strbuf *buf, const char *name, const char *value) > +{ > + strbuf_addstr(buf, name); > + strbuf_addstr(buf, "="); > + sq_quote_buf(buf, value); > + strbuf_addstr(buf, "; "); > +} > + > +static int run_specific_rebase(struct

[PATCH v3 4/4] builtin/rebase: support running "git rebase "

2018-07-06 Thread Pratik Karki
This patch gives life to the skeleton added in the previous patches: With this change, we can perform a elementary rebase (without any options). It can be tested thusly by: git -c rebase.usebuiltin=true rebase HEAD~2 The rebase backends (i.e. the shell script functions defined in