Problems extracting renames

Alexis S. L. Carvalho alexis at cecm.usp.br
Thu Feb 7 09:02:07 CST 2008


Thus spake Brendan Cully:
> I think there have been other reports that git diff doesn't always find
> renames. Hopefully there's something in the bts about this. If not, Alexis
> may remember more than I do.

The rename detection code used by diff will only work if the first rev
is the Nth first grandparent of the second rev.  And as Till Varoquaux
example later in this thread shows, it also won't work if you have a
merge across renames.

>                              I believe the right answer is to make git diff
> (and status) use the rename detection code in merge.py.  Currently one or
> both of those have handrolled versions that aren't quite complete.

The code for status is even simpler - it just looks at the dirstate, so
it won't work if you're comparing 2 revisions.

Alexis


More information about the Mercurial mailing list