Skip to content

Commit c8e34a7

Browse files
committed
Merge branch 'ab/sparse-index-cleanup'
Code clean-up. * ab/sparse-index-cleanup: sparse-index.c: remove set_index_sparse_config()
2 parents 502a678 + b79f9c0 commit c8e34a7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

sparse-index.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static int convert_to_sparse_rec(struct index_state *istate,
102102
return num_converted - start_converted;
103103
}
104104

105-
static int set_index_sparse_config(struct repository *repo, int enable)
105+
int set_sparse_index_config(struct repository *repo, int enable)
106106
{
107107
int res;
108108
char *config_path = repo_git_path(repo, "config.worktree");
@@ -111,15 +111,6 @@ static int set_index_sparse_config(struct repository *repo, int enable)
111111
enable ? "true" : NULL);
112112
free(config_path);
113113

114-
prepare_repo_settings(repo);
115-
repo->settings.sparse_index = 1;
116-
return res;
117-
}
118-
119-
int set_sparse_index_config(struct repository *repo, int enable)
120-
{
121-
int res = set_index_sparse_config(repo, enable);
122-
123114
prepare_repo_settings(repo);
124115
repo->settings.sparse_index = enable;
125116
return res;

0 commit comments

Comments
 (0)