aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-16 21:05:23 +0900
committerJunio C Hamano <gitster@pobox.com>2021-05-16 21:05:23 +0900
commitc8e34a7ac20b5d512cb2f1f789eca2a3b12b129f (patch)
tree82f74f20bf4e2d208d41adb2733af2083ebffeaf
parentMerge branch 'ab/streaming-simplify' (diff)
parentsparse-index.c: remove set_index_sparse_config() (diff)
downloadgit-c8e34a7ac20b5d512cb2f1f789eca2a3b12b129f.tar.gz
git-c8e34a7ac20b5d512cb2f1f789eca2a3b12b129f.zip
Merge branch 'ab/sparse-index-cleanup'
Code clean-up. * ab/sparse-index-cleanup: sparse-index.c: remove set_index_sparse_config()
-rw-r--r--sparse-index.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sparse-index.c b/sparse-index.c
index 6f21397e2e..b0d5dc5f08 100644
--- a/sparse-index.c
+++ b/sparse-index.c
@@ -102,7 +102,7 @@ static int convert_to_sparse_rec(struct index_state *istate,
return num_converted - start_converted;
}
-static int set_index_sparse_config(struct repository *repo, int enable)
+int set_sparse_index_config(struct repository *repo, int enable)
{
int res;
char *config_path = repo_git_path(repo, "config.worktree");
@@ -112,15 +112,6 @@ static int set_index_sparse_config(struct repository *repo, int enable)
free(config_path);
prepare_repo_settings(repo);
- repo->settings.sparse_index = 1;
- return res;
-}
-
-int set_sparse_index_config(struct repository *repo, int enable)
-{
- int res = set_index_sparse_config(repo, enable);
-
- prepare_repo_settings(repo);
repo->settings.sparse_index = enable;
return res;
}