Re: [PATCH 2/6] pull: make code more similar to the shell script again

2016-09-09 Thread Johannes Schindelin
Hi Junio, On Mon, 29 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > +static int require_clean_work_tree(const char *action, const char *hint, > > + int gently) > > { > > struct lock_file *lock_file = xcalloc(1,

Re: [PATCH 2/6] pull: make code more similar to the shell script again

2016-08-30 Thread Johannes Schindelin
Hi Junio, On Mon, 29 Aug 2016, Junio C Hamano wrote: > Johannes Schindelin writes: > > > +static int require_clean_work_tree(const char *action, const char *hint, > > + int gently) > > { > > struct lock_file *lock_file = xcalloc(1,

Re: [PATCH 2/6] pull: make code more similar to the shell script again

2016-08-29 Thread Junio C Hamano
Johannes Schindelin writes: > +static int require_clean_work_tree(const char *action, const char *hint, > + int gently) > { > struct lock_file *lock_file = xcalloc(1, sizeof(*lock_file)); > - int do_die = 0; > + int err = 0; > >

[PATCH 2/6] pull: make code more similar to the shell script again

2016-08-25 Thread Johannes Schindelin
When converting the pull command to a builtin, the require_clean_work_tree() function was renamed and the pull-specific parts hard-coded. This makes it impossible to reuse the code, so let's modify the code to make it more similar to the original shell script again. Signed-off-by: Johannes