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>
Elijah Newren committed
Dec 14, 2021 at 04:09 UTC
d35954160a2c00a741e41030ff8449a9ae958439
1 file changed
+1
-1
builtin/clone.c
+1
-1
@@ -633,7 +633,7 @@ static int git_sparse_checkout_init(const char *repo)
633
{
634
struct strvec argv = STRVEC_INIT;
635
int result = 0;
636
- strvec_pushl(&argv, "-C", repo, "sparse-checkout", "init", NULL);
636
+ strvec_pushl(&argv, "-C", repo, "sparse-checkout", "set", NULL);
637
638
/*
639
* We must apply the setting in the current process