Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

Re: [RFC] git submodule split

From: Jens Lehmann <hidden>
Date: 2016-06-15 23:00:38

Am 06.04.2014 23:18, schrieb Michal Sojka:
On Sun, Apr 06 2014, Jens Lehmann wrote:
quoted
Am 02.04.2014 23:52, schrieb Michal Sojka:
quoted
Hello,

I needed to convert a subdirectory of a repo to a submodule and have the
histories of both repos linked together. I found that this was discussed
few years back [1], but the code seemed quite complicated and was not
merged.

[1]: http://git.661346.n2.nabble.com/RFC-What-s-the-best-UI-for-git-submodule-split-tp2318127.html

Now, the situation is better, because git subtree can already do most of
the work. Below is a script that I used to split a submodule from my
repo. It basically consist of a call to 'git subtree split' followed by
'git filter-branch' to link the histories together.

I'd like to get some initial feedback on it before attempting to
integrate it with git sources (i.e. writing tests and doc). What do you
think?
Why do want to rewrite the whole history of the superproject,
wouldn't it suffice to turn a directory into a submodule with
the same content in a simple commit? 
I wanted to publish a project including its history but a part of that
project could not be made public due to legal reasons. Putting that part
into submodule seemed like best idea.
Yep, that makes lots of sense.

I'm not sure yet if this functionality is needed often enough to
put the script under contrib, but I won't object as long as you'd
be willing to maintain it (and help people on this list when they
report any issues).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help