Re: Intensive rename detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Awesome.  Per Linus' tip, I just noticed at the top of a long list of
messages git said:
warning: too many files, skipping inexact rename detection

So I added the config file change, and that did the trick.  Thanks, everyone!

Here's a related but slightly different question: I've been stashing
and unstashing in the midst of all these renames and refactoring, and
now I'm left with some files listed in git status 3 times.  I
understand why this is, but I don't know the best way to proceed.  Git
is telling me:

$ git status | grep MessageBase
src/DotNetOAuth/Messages/MessageBase.cs: needs merge
src/DotNetOAuth/OAuth/Messages/MessageBase.cs: needs merge
src/DotNetOpenAuth/Messages/MessageBase.cs: needs merge
#       unmerged:   src/DotNetOAuth/Messages/MessageBase.cs
#       unmerged:   src/DotNetOAuth/OAuth/Messages/MessageBase.cs
#       unmerged:   src/DotNetOpenAuth/Messages/MessageBase.cs

I want to end up with MessageBase.cs in
src/DotNetOpenAuth/OAuth/Messages/MessageBase.cs, which ironically is
none of these three.  And the couple of lines that changed in the file
need to be merged.  Only two of these listed files exist on disk.  How
can I best leverage git to merge the two files on disk while moving it
to a new location?

> On Mon, Nov 3, 2008 at 8:22 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>>
>> On Mon, 3 Nov 2008, Andrew Arnott wrote:
>> >
>> > I'm refactoring a library including renaming both files and
>> > directories.  A few lines of each file are also changed, but they are
>> > substantially unchanged in content.  I've done a git add to put all my
>> > changes into the index, but a git status shows that git only detected
>> > a few of the renames... most of them are delete-add operations.  Is
>> > there anything I can do to help git recognize the rename so that
>> > history is preserved across this commit?
>>
>> How many renames do you have? Modern versions of git will do any number of
>> exact renames, but the (rather expensive) inexact rename detection has a
>> default limit of something fairly small.
>>
>> You could try adding
>>
>>        [diff]
>>                renamelimit=0
>>
>> to your ~/.gitconfig file. It can be quite expensive though.
>>
>>                        Linus
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux