]> git.ipfire.org Git - thirdparty/git.git/commit
sparse-checkout: add --verbose option to 'clean'
authorDerrick Stolee <stolee@gmail.com>
Fri, 12 Sep 2025 10:30:09 +0000 (10:30 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Sep 2025 19:10:56 +0000 (12:10 -0700)
commit5b5a7f5ebd2e2701ac6fa522866f22b885147c01
tree8246439b3f1b89c4a94c63ad61dc6110ea83ea77
parent1588e836bb956d14e6cb38e35933ed2749c023b4
sparse-checkout: add --verbose option to 'clean'

The 'git sparse-checkout clean' subcommand is focused on directories,
deleting any tracked sparse directories to clean up the worktree and
make the sparse index feature work optimally.

However, this directory-focused approach can leave users wondering why
those directories exist at all. In my experience, these files are left
over due to ignore or exclude patterns, Windows file handles, or
possibly merge conflict resolutions.

Add a new '--verbose' option for users to see all the files that are
being deleted (with '--force') or would be deleted (with '--dry-run').

Based on usage, users may request further context on this list of files for
states such as tracked/untracked, unstaged/staged/conflicted, etc.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-sparse-checkout.adoc
builtin/sparse-checkout.c
t/t1091-sparse-checkout-builtin.sh