git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matheus Tavares <matheus.bernardino@usp.br>
To: git@vger.kernel.org
Cc: Johannes.Schindelin@gmx.de
Subject: [PATCH 0/2] checkout: don't follow symlinks when removing entries
Date: Thu, 18 Mar 2021 15:43:45 -0300	[thread overview]
Message-ID: <cover.1616091229.git.matheus.bernardino@usp.br> (raw)

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


             reply	other threads:[~2021-03-18 18:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 18:43 Matheus Tavares [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1616091229.git.matheus.bernardino@usp.br \
    --to=matheus.bernardino@usp.br \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).