Skip to content

checkout: don't follow symlinks when removing entries

Matheus Tavares git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2symlinks: update comment on threaded_check_leading_path()symlinks.c+3 -230 replies
2/2checkout: don't follow symlinks when removing entriescache.h entry.c symlinks.c +2 more+37 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] checkout: don't follow symlinks when removing entries

If the leading path of a tracked file gets replaced by a symlink, git checkout will follow that symlink when removing the file. This bug seems to be present since 2011. Fix that and add a regression test.

Matheus Tavares (2):
symlinks: update comment on threaded_check_leading_path()
checkout: don't follow symlinks when removing entries

 cache.h                       |  2 +-
 entry.c                       |  2 +-
 symlinks.c                    | 54 ++++++++++++++++-------------------
 t/t2021-checkout-overwrite.sh | 12 ++++++++
 unpack-trees.c                |  2 +-
 5 files changed, 39 insertions(+), 33 deletions(-)
Signature · 1 line
2.30.1