Re: Merge after directory rename ?
- From
Marcin Wiśnicki <mwisnicki@gmail.com>
- Date
- Aug 22, 2011, 00:32 UTC
- Message-ID
- <j2s83l$eqg$1@dough.gmane.org>
- In-Reply-To
- <CAMOZ1Bt8cP146xiDXfSA-naSOaS3AC8pUZgW12=3TMg2JGCD=w@mail.gmail.com>
On Sun, 21 Aug 2011 23:53:34 +0000, Michael Witten wrote:
Show 11 quoted lines
> Importantly, note that I used only file names in my example, > specifically: > > 5. [master] rename dir1/file3 to dir3/file3 > > rather than mirroring your example by writing: > > 5. [master] rename dir1 to dir3 > > This is because git fundamentally tracks content, and paths are just one > kind of content associated with another blob of content. Consequently,
I know it tracks content, yet it puts effort to detect file renames. I want it to also detect directory renames, detecting it should be quite easy.
Show 8 quoted lines
> git really knows next to nothing about directories, so it's not too > surprising that git doesn't bother finding such a DIRECTORY rename > anyway (at most, git would detect a FILE rename, and your FILE > `dir1/file2' has nothing to do with, say, the FILE `dir1/file1' being > renamed `dir2/file1'). > > Still, some command line switches could be useful to help the user > express to git what should be going on in a case such as yours.
I would prefer it to be fully automatic :) Or at least detect/warn about tree conflict. Directory renames can happen quite frequently when working with Java/C# and it is unreasonable to expect that lazy user will have to keep track of it manually (with huge number of files it's impossible).