Merging the submodules in the main branch

Everything about development and the OpenMW source code.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Merging the submodules in the main branch

Post by werdanith »

To our wise and beloved project manager:
From what I understand a git submodule is used to keep a separate branch for an imported project so that it's also used and developed separately by other projects. At this point with Nicolay gone, even ourselves are not very fond of having to maintain the multiple layers of the engine, let alone somebody else forking them and using them. So me and some other developers on irc were wondering whether it would be too much of a hassle to at least get rid of the submodules and merge Mangle and OpenEngine in the main branch. I think it would make everyone's life easier and would be worth the effort.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: Merging the submodules in the main branch

Post by jhooks1 »

Yes, definitely. I am all for this, would make things so less complicated.
User avatar
pvdk
Posts: 528
Joined: 12 Aug 2011, 16:34

Re: Merging the submodules in the main branch

Post by pvdk »

+1 on that!
Yacoby
Posts: 119
Joined: 30 Sep 2011, 09:42

Re: Merging the submodules in the main branch

Post by Yacoby »

+1. As far as I am concerned they are just a bit of a pain and I can't see enough development happening on the for other projects to use them
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: Merging the submodules in the main branch

Post by scrawl »

Yeah. Why the extra effort keeping it in a seperate repo if there is no one else using it anyway.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: Merging the submodules in the main branch

Post by Zini »

Absolutely. But I haven't found a good way of reintegrating the sub-modules. Admittedly my git knowledge about submodules is a bit fuzzy. But it sounds like a lot of trouble from what I read. And since I am already loaded with OpenMW-work that should have been finished a month ago, it's unlikely that I get around to doing it any time soon.
corristo
Posts: 495
Joined: 12 Aug 2011, 08:29

Re: Merging the submodules in the main branch

Post by corristo »

Can anyone review?
https://github.com/corristo/openmw/comm ... submodules
used subtree merge approach from here: http://stackoverflow.com/questions/1425 ... positories

UPD: git log <any file that was in submodule> shows only merge commit in history. bad =\
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Merging the submodules in the main branch

Post by werdanith »

corristo wrote:Can anyone review?
https://github.com/corristo/openmw/comm ... submodules
used subtree merge approach from here: http://stackoverflow.com/questions/1425 ... positories
I took a look around with a git GUI, git log and git blame, and this is what I see. The history of the 3 projects seems merged and I see all the separate commits with the GUI and git blame displays correct results with each file. The downside is that git log only shows the commit of the merge. I tried to compile it and tinker with it but I can't since it's the latest OpenEngine and Mangle with an old master branch so there are conflicts. I tried to pull from the latest master and that did no go well either.
Anyway overall this looks very promising, with the downside that if we want a git log we will have to clone the old branches.

Edit: Tried reverting my old commit in Mangle and it works just fine.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Merging the submodules in the main branch

Post by werdanith »

Note: when I said git log, I meant git log [file], git log on its own seemed to behave correctly.

Now I'm waiting for corristo to redo this with the latest master so I can try again.
User avatar
werdanith
Posts: 295
Joined: 26 Aug 2011, 16:18

Re: Merging the submodules in the main branch

Post by werdanith »

I tried corristo's latest attempt. I deleted the mangle and openengine folders and merged, and had no issues. After that the game compiles and works, git blame, git log and git diff behave correctly. The only thing that doesn't is git log [mangle/file] which mentions only the merge. I tried a git revert of my old mangle commit, and it worked correctly, with the only downside that it had to recompile that whole project from scratch.

By my standards this is good enough, I don't even know if we can get it better.
Post Reply