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

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

From
Elijah Newren <newren@gmail.com>
Date
Sep 27, 2018, 04:20 UTC
Message-ID
<CABPp-BEMTn2LEq8pB7Yenudnp0rSRfXCzeej4p3SE0BGovosmA@mail.gmail.com>
In-Reply-To
<875zysj6fq.fsf@evledraar.gmail.com>
On Wed, Sep 26, 2018, 2:27 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 6 quoted lines
>
> On Wed, Sep 26 2018, Andrea Stacchiotti wrote:
>
> > I'm very sorry, I indeed forgot the `diff.renames=copies`.
> >
> > The following script can reproduce the bug even with a blank config:
Thanks for the bug report and the simple testcase.
Show 29 quoted lines
> > ---------------------
> >
> > # Make a test repo
> > git init testrepo
> > cd testrepo
> > git config user.name A
> > git config user.email B
> > git config diff.renames copies
> >
> > # 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
>
> Thanks. Bisecting shows that the bug is in dc6b1d92ca ("wt-status: use
> settings from git_diff_ui_config", 2018-05-04) first released with
> 2.18.0.

The bisect is slightly misleading; the bug was introduced in 2.17.0 for renames, and when copy detection became a thing in 2.18.0 it also incidentally would trigger with copies. I'll post a patch soon.

Previous: Andrea Stacchiotti
Message 4 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.