Skip to content

Commit 65156ac

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 6dc8ad5 commit 65156ac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sparse-index.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,8 @@ static int clear_skip_worktree_from_present_files_sparse(struct index_state *ist
639639
if (path_found(ce->name, &data)) {
640640
if (S_ISSPARSEDIR(ce->ce_mode)) {
641641
to_restart = 1;
642+
trace2_data_string("sparse-index", istate->repo,
643+
"skip-worktree sparsedir", ce->name);
642644
break;
643645
}
644646
ce->ce_flags &= ~CE_SKIP_WORKTREE;

0 commit comments

Comments
 (0)