Skip to content

Commit b8d1146

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 6625df6 commit b8d1146

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
@@ -623,6 +623,8 @@ static int clear_skip_worktree_from_present_files_sparse(struct index_state *ist
623623
if (path_found(ce->name, &data)) {
624624
if (S_ISSPARSEDIR(ce->ce_mode)) {
625625
to_restart = 1;
626+
trace2_data_string("sparse-index", istate->repo,
627+
"skip-worktree sparsedir", ce->name);
626628
break;
627629
}
628630
ce->ce_flags &= ~CE_SKIP_WORKTREE;

0 commit comments

Comments
 (0)