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

Triggering "BUG: wt-status.c:476: multiple renames on the same target? how?"

From
ASAndrea Stacchiotti <andreastacchiotti@gmail.com>
Date
Sep 26, 2018, 20:27 UTC
Message-ID
<3c11c193-a978-69be-4b8e-4b59b270338e@gmail.com>
Dear maintainer(s),

the following script, when executed with git 2.19 triggers the bug in the subject line. The problem seems to be the interaction between add -N and rename detection.

The git binary used is the one currently packaged in Debian unstable.

I have searched the list for the bug text and have found nothing, apologies if the bug is already known.

System information, script content and script output follow.
Andrea Stacchiotti
--------------------------

andreas@trelitri:/tmp$ uname -a Linux trelitri 4.17.0-3-amd64 #1 SMP Debian 4.17.17-1 (2018-08-18) x86_64 GNU/Linux andreas@trelitri:/tmp$ git --version git version 2.19.0

andreas@trelitri:/tmp$ cat bugscript.sh # Make a test repo git init testrepo cd testrepo git config user.name A git config user.email B

# Add a file called orig echo 'a' > orig git add orig git commit -m'orig'

# Copy orig in new and modify orig cp orig new echo 'b' > orig

# add -N and then commit trigger the bug git add -N new git commit

# Cleanup cd .. rm -rf testrepo

andreas@trelitri:/tmp$ LANG=C ./bugscript.sh
Initialized empty Git repository in /tmp/testrepo/.git/
[master (root-commit) 5dedf30] orig
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 orig
BUG: wt-status.c:476: multiple renames on the same target? how?
./bugscript.sh: line 18: 22762 Aborted                 git commit
Next: Ævar Arnfjörð Bjarmason
Message 1 of 4 in “Triggering "BUG: wt-status.c:476: multiple renames on the same target? how?"”
  1. Andrea StacchiottiSep 26, 2018
  2. Ævar Arnfjörð BjarmasonSep 26, 2018
  3. Andrea StacchiottiSep 26, 2018
  4. Elijah NewrenSep 27, 2018

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.