{"thread":{"id":"10317","subject":"Some git mv questions","startedAt":"2007-10-16T15:33:49Z","lastAt":"2007-10-16T21:09:27Z","messageCount":4,"participants":["Jan Wielemaker","Lars Hjemli","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"56064","messageId":"200710161733.49185.wielemak@science.uva.nl","threadId":"10317","inReplyTo":null,"subject":"Some git mv questions","fromName":"Jan Wielemaker","fromEmail":"wielemak@science.uva.nl","sentAt":"2007-10-16T15:33:49Z","receivedAt":"2007-10-16T15:33:49Z","isPatch":false,"sender":{"key":"wielemak@science.uva.nl","avatar":null},"body":"Hi,\n\nFor the impatient, start [HERE].\n\nI'm about to start shuffling files and directories around in a big project,\nwhile others keep working on their files.  This is a bit scary as I\nstill feel pretty much newbie in the GIT world :-)  \n\nI did a little test as follows.  Given a shared repository sandbox.git\nwith a file in there I did the following, which worked fine.\n\n\t* [player one] clone the DB, edit the file, commit and push\n\t* [player two] clone the DB\n\t\t- git branch shuffle\n\t\t- git checkout shuffle\n\t\t- mkdir SomeDir\n\t\t- git mv file SomeDir\n\t\t- edit SomeDir/file\n\t\t- git commit -a\n\t* Sofar so good, now merge:\n\t\t- git checkout master\n\t\t- git pull (get player 1 changes)\n\t\t- git merge shuffle\n\t\t- git branch -d shuffle\n\t\t- git commit -a\n\t\t- git push\n\nSofar so good, but during the tests I had two times problems:\n\n\t* Instead of \"git mv file SomeDir\" I simply used \"mv file SomeDir\"\n\tand git-add.  Now I end up with two files and of course the changes\n\tare not merged.  I can understand that.\n\n[HERE]\n\t* On a somewhat bigger test I moved a large directory using\n\t\"git mv dir newdir\" (where newdir is an existing directory).\n\tNow \"git status\" gives a lot of new and deleted files!?  I\n\tguess I'm going to have a big mess if that happens in the\n\treal project.  Moving some smaller test directories simply\n\tshowed a series of renames.\n\n\tCan this be explained?  Is this a bug?\n\n\tThanks --- Jan\n"},{"id":"56072","messageId":"8c5c35580710160905v69787856m7ed11b037c1adef1@mail.gmail.com","threadId":"10317","inReplyTo":"200710161733.49185.wielemak@science.uva.nl","subject":"Re: Some git mv questions","fromName":"Lars Hjemli","fromEmail":"hjemli@gmail.com","sentAt":"2007-10-16T16:05:28Z","receivedAt":"2007-10-16T16:05:28Z","isPatch":false,"sender":{"key":"hjemli@gmail.com","avatar":null},"body":"On 10/16/07, Jan Wielemaker <wielemak@science.uva.nl> wrote:\n>         * On a somewhat bigger test I moved a large directory using\n>         \"git mv dir newdir\" (where newdir is an existing directory).\n>         Now \"git status\" gives a lot of new and deleted files!?\n\nYou could try to adjust diff.renameLimit in .git/config\n\n--\nlarsh\n"},{"id":"56099","messageId":"alpine.LFD.0.999.0710161030430.6887@woody.linux-foundation.org","threadId":"10317","inReplyTo":"8c5c35580710160905v69787856m7ed11b037c1adef1@mail.gmail.com","subject":"Re: Some git mv questions","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-10-16T17:34:01Z","receivedAt":"2007-10-16T17:34:01Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 16 Oct 2007, Lars Hjemli wrote:\n\n> On 10/16/07, Jan Wielemaker <wielemak@science.uva.nl> wrote:\n> >         * On a somewhat bigger test I moved a large directory using\n> >         \"git mv dir newdir\" (where newdir is an existing directory).\n> >         Now \"git status\" gives a lot of new and deleted files!?\n> \n> You could try to adjust diff.renameLimit in .git/config\n\nYes. The default rename limit I did has turned out to be a disaster. It's \nquite common to have more than a 100x100 matrix of deleted files.\n\nFor people with any kind of beefy hardware, I'd just suggest doing a\n\n\tgit config --global diff.renamelimit 0\n\nwhich disables the rename limiting entirely.\n\nThere's a related (embarrassing) problem, namely that I think that the \ncurrent released versions (1.5.3.3 and 1.5.3.4) don't honor the \nrenamelimit configuration for merging, so if you do merges across renames \nwith changes to the renamed files, you need to use either an older git \nthat didn't have the rename limit at all (nor any of the speed-ups) or you \nneed to use current git from the 'master' branch.\n\n\t\tLinus\n"},{"id":"56125","messageId":"200710162309.28739.wielemak@science.uva.nl","threadId":"10317","inReplyTo":"alpine.LFD.0.999.0710161030430.6887@woody.linux-foundation.org","subject":"Re: Some git mv questions","fromName":"Jan Wielemaker","fromEmail":"wielemak@science.uva.nl","sentAt":"2007-10-16T21:09:27Z","receivedAt":"2007-10-16T21:09:27Z","isPatch":false,"sender":{"key":"wielemak@science.uva.nl","avatar":null},"body":"On Tuesday 16 October 2007 19:34, Linus Torvalds wrote:\n> On Tue, 16 Oct 2007, Lars Hjemli wrote:\n> > On 10/16/07, Jan Wielemaker <wielemak@science.uva.nl> wrote:\n> > >         * On a somewhat bigger test I moved a large directory using\n> > >         \"git mv dir newdir\" (where newdir is an existing directory).\n> > >         Now \"git status\" gives a lot of new and deleted files!?\n> >\n> > You could try to adjust diff.renameLimit in .git/config\n>\n> Yes. The default rename limit I did has turned out to be a disaster. It's\n> quite common to have more than a 100x100 matrix of deleted files.\n>\n> For people with any kind of beefy hardware, I'd just suggest doing a\n>\n> \tgit config --global diff.renamelimit 0\n>\n> which disables the rename limiting entirely.\n>\n> There's a related (embarrassing) problem, namely that I think that the\n> current released versions (1.5.3.3 and 1.5.3.4) don't honor the\n> renamelimit configuration for merging, so if you do merges across renames\n> with changes to the renamed files, you need to use either an older git\n> that didn't have the rename limit at all (nor any of the speed-ups) or you\n> need to use current git from the 'master' branch.\n\nThanks both of you.  I can master that.  I understand I only should ensure\nto be running the latest version if I start the merge?\n\n\tCheers --- Jan\n"}]}