]> git.ipfire.org Git - thirdparty/git.git/commitdiff
clone: avoid using deprecated `sparse-checkout init`
authorElijah Newren <newren@gmail.com>
Tue, 14 Dec 2021 04:09:12 +0000 (04:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Dec 2021 19:48:22 +0000 (11:48 -0800)
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>
builtin/clone.c

index fb377b27657c4048a04c85ddb82e15a950db5a7d..5bed37f8b51e4b0babc2adef52efc0cdb3ffda43 100644 (file)
@@ -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