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>
This commit is contained in:
committed by
Junio C Hamano
parent
1624333ec1
commit
1e9e10e048
@ -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"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user