[PATCH v4 10/10] clone: avoid using deprecated `sparse-checkout init`
- From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Dec 14, 2021, 04:09 UTC
- Message-ID
- <ae671aa615ac93161ef2260faea0f5df28f5f029.1639454952.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1151.v4.git.git.1639454952.gitgitgadget@gmail.com>
From: Elijah Newren <newren@gmail.com>
The previous commits marked `sparse-checkout init` as deprecated; we can just use `set` instead here and pass it no paths.
Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Victoria Dye <vdye@github.com> Signed-off-by: Elijah Newren <newren@gmail.com> --- builtin/clone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/clone.c b/builtin/clone.c index fb377b27657..5bed37f8b51 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -633,7 +633,7 @@ static int git_sparse_checkout_init(const char *repo) { struct strvec argv = STRVEC_INIT; int result = 0; - strvec_pushl(&argv, "-C", repo, "sparse-checkout", "init", NULL); + strvec_pushl(&argv, "-C", repo, "sparse-checkout", "set", NULL); /* * We must apply the setting in the current process
-- gitgitgadget