Thread (58 messages) 58 messages, 7 authors, 2021-12-23

[PATCH v4 10/10] clone: avoid using deprecated `sparse-checkout init`

STALE1746d REVIEWED: 2 (0M)

From: Elijah Newren via GitGitGadget <hidden>
Date: 2021-12-14 04:09:38
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v4 of 3 in this series; 2 review trailers.

Revisions (3)
  1. v2 [diff vs current]
  2. v3 [diff vs current]
  3. v4 current
From: Elijah Newren <redacted>

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 <redacted>
Reviewed-by: Victoria Dye <redacted>
Signed-off-by: Elijah Newren <redacted>
---
 builtin/clone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index fb377b27657..5bed37f8b51 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
-- 
gitgitgadget
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help