11

Now that git subtree has been merged into the core git distribution (its also on Msysgit as of 1.8.0), does anyone know if git svn works with git subtree?

Note: I am not talking about the subtree merge strategy, but about this.

Git submodules cannot be used directly when you are using git svn. Instead, it requires another level of indirection. In addition, the git subtree workflow is more convenient when you're tracking third party respositories, which is something that happens when you use svn too.

My question is, how do I find out if git subtree has any issues when used with git svn?

Community
  • 1
  • 1
Carl
  • 43,122
  • 10
  • 80
  • 104
  • What do you mean by "works with"? What setup are you talking about? – me_and Apr 02 '13 at 18:53
  • 1
    Without sounding crass - just try it. But seriously, what do you want working - it seems that you are not understanding git-svn, its just a conduit between svn and git repositories. – Michael Apr 03 '13 at 21:38
  • 1
    @Michael : The reason for this question is to avoid the "just try it" approach. It comes with the less desirable "discover all the gotchas and fix them" side which can be a massive time sink and is not really justified in a production environment unless there is a good business case. – Carl Apr 03 '13 at 22:47
  • Oh I was not saying just try it in Production, but you can try it outside of Production and test your scenarios. – Michael Apr 06 '13 at 17:43
  • Agreed. However, the question that arises then is, "What is a good enough test?" – Carl Apr 06 '13 at 21:32

2 Answers2

4

I am currently using it. The only issue (or side effect) I noticed, is that if I dcommit into the svn the merge from the subtree is committed as one single commit (like squash); so you will loose the history of the subtree commits in the svn repo.

housemaister
  • 3,918
  • 3
  • 19
  • 13
  • I don't mind the squash, I'd prefer it way so as not to flood my co-workers svn history with third-party commits. What I've had trouble with is the squashed commit (to git, before dcommit) looks like it will be applied to the root of the svn repository, rather than the prefix path. – Sam Hasler Apr 05 '13 at 09:17
0

There is can be a possibility to accidentally mix subtrees together (make an intersection part that can exist both in a parent and in a child subtrees, or in repository root and in a repository subtree). In that case git may throw strange pull errors like ! [rejected] or merge conflicts at auto-merging.

A search for real source of the issue through the mess of conflicts like these can be a real pain.

Andry
  • 2,273
  • 29
  • 28