From: Elijah Newren Date: Tue, 14 Dec 2021 04:09:12 +0000 (+0000) Subject: clone: avoid using deprecated `sparse-checkout init` X-Git-Tag: v2.35.0-rc0~45^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d35954160a2c00a741e41030ff8449a9ae958439;p=thirdparty%2Fgit.git 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 Reviewed-by: Victoria Dye Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- 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