Re: [PATCH 4/5] unpack-trees: factor file removal out of check_updates

2017-01-09 Thread Stefan Beller
On Fri, Jan 6, 2017 at 5:36 PM, Jeff King wrote: >> +static int remove_workingtree_files(struct unpack_trees_options *o, >> + unsigned cnt = 0; > > "cnt" is unsigned here, as it is in the caller. Should the return value > match? Yes, obviously. :/ Thanks for catching,

Re: [PATCH 4/5] unpack-trees: factor file removal out of check_updates

2017-01-06 Thread Jeff King
On Fri, Jan 06, 2017 at 01:03:29PM -0800, Stefan Beller wrote: > +static int remove_workingtree_files(struct unpack_trees_options *o, > + struct progress *progress) > +{ > + int i; > + unsigned cnt = 0; > + struct index_state *index = >result; > + > +

[PATCH 4/5] unpack-trees: factor file removal out of check_updates

2017-01-06 Thread Stefan Beller
This makes check_updates shorter and easier to understand. Signed-off-by: Stefan Beller --- unpack-trees.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 971d091fd0..b954ec1233 100644