summaryrefslogtreecommitdiff
path: root/chdir-notify.c
diff options
context:
space:
mode:
authorLibravatar Elijah Newren <newren@gmail.com>2020-03-27 00:48:50 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-03-27 11:33:30 -0700
commit3cc7c50402ce1cbac9735da64844eb00bc096f46 (patch)
tree41d77a1d414b0d2713f7820188c3e1c649bb459b /chdir-notify.c
parentunpack-trees: allow check_updates() to work on a different index (diff)
downloadtgif-3cc7c50402ce1cbac9735da64844eb00bc096f46.tar.xz
unpack-trees: do not mark a dirty path with SKIP_WORKTREE
If a path is dirty, removing from the working tree risks losing data. As such, we want to make sure any such path is not marked with SKIP_WORKTREE. While the current callers of this code detect this case and re-populate with a previous set of sparsity patterns, we want to allow some paths to be marked with SKIP_WORKTREE while others are left unmarked without it being considered an error. The reason this shouldn't be considered an error is that SKIP_WORKTREE has always been an advisory-only setting; merge and rebase for example were free to materialize paths and clear the SKIP_WORKTREE bit in order to accomplish their work even though they kept the SKIP_WORKTREE bit set for other paths. Leaving dirty working files in the working tree is thus a natural extension of what we have already been doing. Reviewed-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'chdir-notify.c')
0 files changed, 0 insertions, 0 deletions