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.