Skip to content

Commit e751308

Browse files
committed
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 <stolee@gmail.com>
1 parent dc7b1e0 commit e751308

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
@@ -632,6 +632,8 @@ static int clear_skip_worktree_from_present_files_sparse(struct index_state *ist
632632
if (path_found(ce->name, &data)) {
633633
if (S_ISSPARSEDIR(ce->ce_mode)) {
634634
to_restart = 1;
635+
trace2_data_string("sparse-index", istate->repo,
636+
"skip-worktree sparsedir", ce->name);
635637
break;
636638
}
637639
ce->ce_flags &= ~CE_SKIP_WORKTREE;

0 commit comments

Comments
 (0)