Hi Damien,

Am 2012-10-12 00:28, schrieb Damien Robert:
Actually, I don't think you need to make 'grafting mergs done with the
subtree strategy'. When you use grafts, you change the parent of the
commits, but you don't change the snapshot of the repository corresponding
with the commit. Let's say  you had this situation:
trunk/ExtLibs/lua1  corresponding to commit A on branch master in the git
Now you update the vendor lua:
vendor/lua2, corresponding to commit B on branch vendor
Then you did the svn merge to get
trunk/ExtLibs/lua2 corresponding to commit C on branch master.

Note that using svn, you did a sort of subtree merge, so that commit C has
the right content, the only problem is that the parent of C is A, not A and
B. So you use a graft to add B as a parent of C, but it won't change the
content of C, so in the git side it will look exactly as if you had done a
subtree merge too (git only store the result of the merge, now how it was

Wow, thank you very much for this insight!
That was exactly the piece of information that I was missing!


I'll test all this further now, but am pretty confident that I can now complete the conversion either way, with or without moving the contents of the vendor branch down to the ExtLibs/ subdirectory.

Don't know yet though which one we'll eventually pick: In hindsight, Subversions very flexible merging feature turned out to be the greatest problem when converting to Git, and now I wonder if Git's subtree feature might impose a similar problem if there ever was a successor in the future.

(Good news, as it seems to me with the above new understanding, is that we can always, also in hindsight, use filter-branch to move the contents in branch vendor into or out of subdirectory ExtLibs/. This would come at the cost of altered SHA-1 sums for quasi all commits, but for the sole purpose of a potential future conversion, that would be worthwhile. :-) )

A thousand thanks and best regards,

   Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
          Learn more at http://www.cafu.de

You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to