aboutsummaryrefslogtreecommitdiff
path: root/Documentation/git-sparse-checkout.adoc
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2025-09-12 10:30:09 +0000
committerJunio C Hamano <gitster@pobox.com>2025-09-15 12:10:56 -0700
commit5b5a7f5ebd2e2701ac6fa522866f22b885147c01 (patch)
tree8246439b3f1b89c4a94c63ad61dc6110ea83ea77 /Documentation/git-sparse-checkout.adoc
parent1588e836bb956d14e6cb38e35933ed2749c023b4 (diff)
downloadgit-5b5a7f5ebd2e2701ac6fa522866f22b885147c01.tar.xz
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>
Diffstat (limited to 'Documentation/git-sparse-checkout.adoc')
-rw-r--r--Documentation/git-sparse-checkout.adoc5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/git-sparse-checkout.adoc b/Documentation/git-sparse-checkout.adoc
index 42050ff5b5..113728a0e7 100644
--- a/Documentation/git-sparse-checkout.adoc
+++ b/Documentation/git-sparse-checkout.adoc
@@ -136,6 +136,11 @@ The `--dry-run` option will list the directories that would be removed
without deleting them. Running in this mode can be helpful to predict the
behavior of the clean comand or to determine which kinds of files are left
in the sparse directories.
++
+The `--verbose` option will list every file within the directories that
+are considered for removal. This option is helpful to determine if those
+files are actually important or perhaps to explain why the directory is
+still present despite the current sparse-checkout.
'disable'::
Disable the `core.sparseCheckout` config setting, and restore the