Browse Source

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>
maint
Elijah Newren 3 years ago committed by Junio C Hamano
parent
commit
d35954160a
  1. 2
      builtin/clone.c

2
builtin/clone.c

@ -633,7 +633,7 @@ static int git_sparse_checkout_init(const char *repo) @@ -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

Loading…
Cancel
Save