Skip to content

Commit 1da9e19

Browse files
derrickstoleedscho
authored andcommitted
sparse-index: log failure to clear skip-worktree
The clear_skip_worktree_from_present_files_sparse() method attempts to clear the skip worktree bit from cache entries in the index depending on when they exist in the workdir. When this comes across a sparse directory that actually exists in the workdir, then this method fails and signals that the index needs expansion. The index expansion already logs a reason, but this reason is separate from the path that caused this failure. Add logging to demonstrate this situation for full clarity. Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e320cf4 commit 1da9e19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: sparse-index.c

+2
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,8 @@ static int clear_skip_worktree_from_present_files_sparse(struct index_state *ist
638638
if (path_found(ce->name, &data)) {
639639
if (S_ISSPARSEDIR(ce->ce_mode)) {
640640
to_restart = 1;
641+
trace2_data_string("sparse-index", istate->repo,
642+
"skip-worktree sparsedir", ce->name);
641643
break;
642644
}
643645
ce->ce_flags &= ~CE_SKIP_WORKTREE;

0 commit comments

Comments
 (0)