summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2021-12-14 04:09:12 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-12-15 11:48:22 -0800
commitd35954160a2c00a741e41030ff8449a9ae958439 (patch)
tree03d200d9ac0a911c6cf0334817511c14eb59453a /builtin/clone.c
parentDocumentation: clarify/correct a few sparsity related statements (diff)
downloadtgif-d35954160a2c00a741e41030ff8449a9ae958439.tar.xz
clone: avoid using deprecated `sparse-checkout init`
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
-rw-r--r--builtin/clone.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/clone.c b/builtin/clone.c
index fb377b2765..5bed37f8b5 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