From: Junio C Hamano Date: Thu, 12 May 2016 19:33:05 GMT Subject: Re: [PATCH v2 18/94] builtin/apply: move 'cached' global into 'struct apply_state' Message-ID: In-Reply-To: <20160511131745.2914-19-chriscool@tuxfamily.org> Christian Couder writes: > To libify the apply functionality the 'cached' variable should > not be static and global to the file. Let's move it into > 'struct apply_state'. > > Reviewed-by: Stefan Beller > Signed-off-by: Christian Couder > --- > builtin/apply.c | 37 +++++++++++++++++++++---------------- > 1 file changed, 21 insertions(+), 16 deletions(-) > > diff --git a/builtin/apply.c b/builtin/apply.c > index 8791b28..09af5dc 100644 > --- a/builtin/apply.c > +++ b/builtin/apply.c > @@ -30,6 +30,9 @@ struct apply_state { > int apply_with_reject; > int apply_verbosely; > > + /* --cached updates only the cache without ever touching the working tree. */ > + int cached; > + Again, this should sit right next to update_index and check_index. Other than that, this step looks correct.