Re: [PATCH v2 18/94] builtin/apply: move 'cached' global into 'struct apply_state'
Christian Couder <christian.couder@gmail.com> writes:
Show 21 quoted lines
> 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 <sbeller@google.com>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
> 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.