git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars Hjemli <hjemli@gmail.com>
To: Eric Kidd <git@randomhacks.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Mark Levedahl <mlevedahl@gmail.com>,
	Ping Yin <pkufranky@gmail.com>
Subject: Re: [RFC/PATCHv2] git submodule split
Date: Sat, 14 Feb 2009 10:03:31 +0100	[thread overview]
Message-ID: <8c5c35580902140103o3e5dd091qe2a18ca52b6fe44a@mail.gmail.com> (raw)
In-Reply-To: <431341160902132117s1696c975mbf20dfbdc65a7df3@mail.gmail.com>

On Sat, Feb 14, 2009 at 06:17, Eric Kidd <git@randomhacks.net> wrote:
> On Fri, Feb 13, 2009 at 11:37 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Eric Kidd <git@randomhacks.net> writes:
>>> ...
>>> If the submodule has moved around the source tree, specify one or more
>>> values for alternate_dir.  To specify the URL of the newly created
>>> repository (for use in .gitmodules), use the --url parameter.
>>
>> Unfortunately, I do not think we have designed fully (nor implemented at
>> all) behaviour to check out different points of history that has the same
>> submodule moved around in the superproject tree.
>>
>> There were several unconcluded discussions done in the past (and I admit I
>> participated in a few of them), but it may be hard to use the resulting
>> repository out of this tool.
>
> Thank you for looking at this proposal!
>
> I think that the resulting repository is usable (though it could
> certainly be better). In particular, the following commands will
> always give you a working checkout:
>
>  git checkout any-version
>  git submodule update --init
>
> The unit tests for git-submodule-split.sh actually walk through the
> entire history and run 'git submodule update --init' at each revision.
> This works correctly because git-submodule-split creates the necessary
> .gitmodules entries for each revision, and includes the
> submodule.*.url value that you specify.
>
> Unfortunately, this means that whenever the submodule moves to a new
> location in the tree, 'git submodule --init' will actually have to
> clone it again. That's not a perfect situation, but it will work for
> reasonably small submodules.

<hand-waving>
I didn't look at the patch, but if the submodule uses a single
module-name while moving around, the re-cloning problem would by
solved if the submodule git-dir was stored inside the git-dir of the
containing repository  (by using the git-file mechanism). Maybe I
should try to finally implement this...
</hand-waving>

--
larsh

  reply	other threads:[~2009-02-14  9:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12 21:50 [RFC] What's the best UI for 'git submodule split'? Eric Kidd
2009-02-14  2:24 ` [RFC/PATCHv2] git submodule split Eric Kidd
2009-02-14  4:37   ` Junio C Hamano
2009-02-14  5:17     ` Eric Kidd
2009-02-14  9:03       ` Lars Hjemli [this message]
2009-02-14 11:44         ` Johannes Schindelin
2009-02-17 10:17         ` Nanako Shiraishi
2009-02-19 19:23           ` Lars Hjemli
2009-02-19 23:04         ` Kyle Moffett
2009-02-14 11:46     ` Johannes Schindelin
2009-02-14 14:11       ` Eric Kidd
2009-02-14 23:01         ` Johannes Schindelin
2009-02-14 23:13           ` Sverre Rabbelier

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=8c5c35580902140103o3e5dd091qe2a18ca52b6fe44a@mail.gmail.com \
    --to=hjemli@gmail.com \
    --cc=git@randomhacks.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=mlevedahl@gmail.com \
    --cc=pkufranky@gmail.com \
    /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).