Skip to content
  • Johannes Schindelin's avatar
    update-index: optionally leave skip-worktree entries alone · 8dfb04ae
    Johannes Schindelin authored and Junio C Hamano's avatar Junio C Hamano committed
    While `git update-index` mostly ignores paths referring to index entries
    whose skip-worktree bit is set, in b4d1690d
    
     (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: default avatarJohannes Schindelin <johannes.schindelin@gmx.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    8dfb04ae