git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] checkout: don't follow symlinks when removing entries
@ 2021-03-18 18:43 Matheus Tavares
  2021-03-18 18:43 ` [PATCH 1/2] symlinks: update comment on threaded_check_leading_path() Matheus Tavares
  2021-03-18 18:43 ` [PATCH 2/2] checkout: don't follow symlinks when removing entries Matheus Tavares
  0 siblings, 2 replies; 3+ messages in thread
From: Matheus Tavares @ 2021-03-18 18:43 UTC (permalink / raw)
  To: git; +Cc: Johannes.Schindelin

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(-)

-- 
2.30.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-18 18:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-18 18:43 [PATCH 0/2] checkout: don't follow symlinks when removing entries Matheus Tavares
2021-03-18 18:43 ` [PATCH 1/2] symlinks: update comment on threaded_check_leading_path() Matheus Tavares
2021-03-18 18:43 ` [PATCH 2/2] checkout: don't follow symlinks when removing entries Matheus Tavares

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).