git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Michal Sojka <sojkam1@fel.cvut.cz>, git@vger.kernel.org
Subject: Re: [RFC] git submodule split
Date: Mon, 07 Apr 2014 21:04:38 +0200	[thread overview]
Message-ID: <5342F6C6.3080703@web.de> (raw)
In-Reply-To: <87d2gukvhb.fsf@steelpick.2x.cz>

Am 06.04.2014 23:18, schrieb Michal Sojka:
> On Sun, Apr 06 2014, Jens Lehmann wrote:
>> Am 02.04.2014 23:52, schrieb Michal Sojka:
>>> 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).

      reply	other threads:[~2014-04-07 19:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 21:52 [RFC] git submodule split Michal Sojka
2014-04-06 16:08 ` Jens Lehmann
2014-04-06 21:18   ` Michal Sojka
2014-04-07 19:04     ` Jens Lehmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5342F6C6.3080703@web.de \
    --to=jens.lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=sojkam1@fel.cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).