Skip to content

Commit c32aa72

Browse files
derrickstoleegitster
authored andcommitted
sparse-index: improve advice message instructions
When an on-disk sparse index is expanded to a full one, it could be due to some worktree state that requires looking at file entries hidden within sparse tree entries. This can be avoided if the worktree is cleaned up and some other issues related to the index state are resolved. Expand the advice message to include all of these cases, since 'git sparse-checkout clean' is not currently capable of handling all cases. In the future, we may improve the behavior of 'git sparse-checkout clean' to handle all of the cases. Helped-by: Elijah Newren <[email protected]> Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 592d2a9 commit c32aa72

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sparse-index.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ int give_advice_on_expansion = 1;
3232
"Your working directory likely has contents that are outside of\n" \
3333
"your sparse-checkout patterns. Use 'git sparse-checkout list' to\n" \
3434
"see your sparse-checkout definition and compare it to your working\n" \
35-
"directory contents. Running 'git sparse-checkout clean' may assist\n" \
36-
"in this cleanup."
35+
"directory contents. Cleaning up any merge conflicts or staged\n" \
36+
"changes before running 'git sparse-checkout clean' or 'git\n" \
37+
"sparse-checkout reapply' may assist in this cleanup."
3738

3839
struct modify_index_context {
3940
struct index_state *write;

0 commit comments

Comments
 (0)