]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/git-update-index.txt
update-index: optionally leave skip-worktree entries alone
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 30 Oct 2019 10:49:37 +0000 (10:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 2 Nov 2019 06:22:00 +0000 (15:22 +0900)
commit8dfb04ae964868dda758997e5e7da29edff6164b
tree5d1eee5a858583ef426eb0086ec370d0899473e3
parent5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
update-index: optionally leave skip-worktree entries alone

While `git update-index` mostly ignores paths referring to index entries
whose skip-worktree bit is set, in b4d1690df11 (Teach Git to respect
skip-worktree bit (reading part), 2009-08-20), for reasons that are not
entirely obvious, the `--remove` option was made special: it _does_
remove index entries even if their skip-worktree bit is set.

Seeing as this behavior has been in place for a decade now, it does not
make sense to change it.

However, in preparation for fixing a bug in `git stash` where it
pretends that skip-worktree entries have actually been removed, we need
a mode where `git update-index` leaves all skip-worktree entries alone,
even if the `--remove` option was passed.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-update-index.txt
builtin/update-index.c
t/t7012-skip-worktree-writing.sh