git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Matheus Tavares <matheus.bernardino@usp.br>
Date
Mar 18, 2021, 18:43 UTC
Message-ID
<cover.1616091229.git.matheus.bernardino@usp.br>

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
Next: Matheus Tavares
Message 1 of 3 in “checkout: don't follow symlinks when removing entries”
  1. 0/2 checkout: don't follow symlinks when removing entriesMatheus Tavares, Mar 18, 2021
  2. 1/2 symlinks: update comment on threaded_check_leading_path()Matheus Tavares, Mar 18, 2021
  3. 2/2 checkout: don't follow symlinks when removing entriesMatheus Tavares, Mar 18, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.