[Kde-scm-interest] Git roadmap
Johannes Sixt
j.sixt at eudaptics.com
Tue Sep 18 12:33:11 CEST 2007
Thiago Macieira schrieb:
> On Tuesday 18 September 2007 10:58:24 Johannes Sixt wrote:
>> Thiago Macieira schrieb:
>>> There's also the issue of issue of copy-with-history across modules.
>> I *think* this could be solved with git's git has a merge strategy
>> "subtree", which is sort of a "poor man's sub-module" support:
>>
>> 1. Use git filter-branch --subdirectory to extract the history from the
>> source module.
>>
>> 2. Splice the directory with git merge -s subtree into the destination.
>>
>> 3. If necessary, follow up with another suitable git filter-branch in the
>> destination to fix the history.
>>
>> Maybe this can even be automated.
>
> Indeed. This is what I want to do with a new tool called "git-xcopy". My
> current git-svn import of kdebase does that for the copy-from-kdelibs
> directories. I did the merging manually, though, by using grafts -- this
> worked because I was importing from SVN and the final product of the merge
> was already there.
>
> I do believe the conversion will have to follow such a procedure. That is, the
> fast-export tool will need to simulate filter-branch --subdirectory,
> introduce the commits and then do the merge (two "from" lines).
>
> One thing though: I don't understand step 3. What fixes are you thinking of
> there?
I was mostly thinking of how to do this after-the-fact. I.e. you see an
entire subdirectory appearing in some commit, and want to splice the
original history below it. Here, you'd pick the filtered history from the
original submodule and graft it as an additional parent to the commit in
question. Then you'd run filter-branch to incorporate the graft.
But I'm sure this can also be automated in the conversion procedure.
> My only concern is not the progression or normal evolution of a module, but
> instead "move back and forth" of something. Granted, that doesn't happen
> often, but it could. I know it happened once in
> kdelibs->kdebase->kdelibs->kdebase (KSSL-related). That specific case we can
> easily solve by hand, but what about the future?
Well, the person who moves the directory across sub-modules will have to do
the filter-branch + merge-subtree procedure manually. Unless git-xcopy is
doing exactly that.
-- Hannes
More information about the Kde-scm-interest
mailing list