Re: renames in StGIT
- From
- Catalin Marinas <catalin.marinas@gmail.com>
- Date
- Oct 24, 2006, 10:25 UTC
- Message-ID
- <b0943d9e0610240325v5bc23078w7fc977e091e99779@mail.gmail.com>
- In-Reply-To
- <20061024091620.GB29265@diana.vm.bytemark.co.uk>
On 24/10/06, Karl Hasselström <kha@treskal.com> wrote:
Show 12 quoted lines
> On 2006-10-24 09:48:44 +0100, Catalin Marinas wrote: > > Step 3 above is handled per file by the > > stgit.gitmergeonefile.merge() function. This is the place where we > > should have the rename detection. Since, the majority of the patches > > don't rename files and, in most cases, the push finishes at step 2, > > it is probably safe to extend this function and the users won't > > notice a speed difference. > > > > I'll add it to the TODO list. > > Sounds good. I had a feeling it ought to be basically free in the > majority of cases, so I'm glad to learn I'm right. :-)
Might be even simpler for 'push' but I need to do more tests - instead of calling git-read-tree in git.merge(), just call git-merge-recursive which handles renames and it's fully tested. My simple test detected renames when pushing patches (both rename in base and rename in patch). I still have to do some tweaking and write proper tests (and probably make it less verbose).
-- Catalin