[Kde-scm-interest] Re: git filter-branch preserving history

Arno Rehn kde at arnorehn.de
Mon Nov 22 17:31:28 CET 2010


On Friday 19 November 2010 22:19:56 Boyd Stephen Smith Jr. wrote:
> In <201011192131.35518.kde at arnorehn.de>, Arno Rehn wrote:

> >Maybe the initial svn2git rules are not correct so that git somehow thinks
> >the commits would be related... but some of those rules would then be
> >REALLY wrong, which I don't quite believe.
> 
> I tend to doubt that.  I think filter-branch preserved empty commits that
> weren't at the tip for some reason.  The documentation seems to imply that
> keeping empty commits is the default behavior.  --subdirectory-filter does
> imply --remap-to-ancestor, but that will only drop empty commits near the
> tip.
Pushing the branches one at a time to a clean repository, I've found out what 
goes wrong. Here's what happened:

Prior to 4.0 the kdebindings layout looked like:

kdebindings/
    ...
    qtruby/
    korundum/
    ....

Shortly before 4.0 this was changed to:

kdebindings/
    ...
    ruby/
         qtruby/
         korundum/
    ...

So if I --subdirectory-filter for the ruby/ subdir, the filter will only match 
after this change has happened. In everything < 4.0 it obviously can't match 
anything and thus all those branches simply stay the same, with all the 
history from every other subdirectory.
I don't know yet how to solve this best, but at least I know now what's going 
wrong.

-- 
Arno Rehn
arno at arnorehn.de


More information about the Kde-scm-interest mailing list