Re: [PATCH 07/13] add: implement the --sparse option
- From
Matheus Tavares Bernardino <matheus.bernardino@usp.br>
- Date
- Aug 27, 2021, 21:14 UTC
- Message-ID
- <CAHd-oW7xvnojJsxi7thukOtQ0=m2eiGdkr9Ne+kj1Lufc_MbZg@mail.gmail.com>
- In-Reply-To
- <6edadbc2000bd6d2ec76cbeff08b309ae4928b37.1629842085.git.gitgitgadget@gmail.com>
On Tue, Aug 24, 2021 at 6:54 PM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 13 quoted lines
> > diff --git a/builtin/add.c b/builtin/add.c > index 3a109276b74..68f2de80594 100644 > --- a/builtin/add.c > +++ b/builtin/add.c > > @@ -46,7 +47,7 @@ static int chmod_pathspec(struct pathspec *pathspec, char flip, int show_only) > struct cache_entry *ce = active_cache[i]; > int err; > > - if (ce_skip_worktree(ce)) > + if (!include_sparse && ce_skip_worktree(ce)) > continue;
Not related to this change but just as a reminder: if you agree with my suggestion from the previous patch to use the skipping logic at run_diff_files() or update_callback(), we also need to override it in this patch when include_sparse is true.