Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictoria Dye <vdye@github.com>2022-01-11 21:05:00 +0300
committerJunio C Hamano <gitster@pobox.com>2022-01-14 00:49:45 +0300
commit1e9e10e04891a13e5ccd52b36cfadc55dfaa5066 (patch)
tree652023c91c7f1c4535b63a4ec5b3877a3c63b91e /builtin/clean.c
parent1624333ec1486378c44ce38e4f8ae9d02c07d15a (diff)
clean: integrate with sparse index
Remove full index requirement for `git clean` and test to ensure the index is not expanded in `git clean`. Add to existing test for `git clean` to verify cleanup of untracked files in sparse directories is consistent between sparse index and non-sparse index checkouts. Signed-off-by: Victoria Dye <vdye@github.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clean.c')
-rw-r--r--builtin/clean.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/clean.c b/builtin/clean.c
index 98a2860409..5628fc7103 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -983,6 +983,9 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
dir.flags |= DIR_KEEP_UNTRACKED_CONTENTS;
}
+ prepare_repo_settings(the_repository);
+ the_repository->settings.command_requires_full_index = 0;
+
if (read_cache() < 0)
die(_("index file corrupt"));