From: Eric Kidd <git@randomhacks.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Mark Levedahl <mlevedahl@gmail.com>,
Ping Yin <pkufranky@gmail.com>, Lars Hjemli <hjemli@gmail.com>
Subject: Re: [RFC/PATCHv2] git submodule split
Date: Sat, 14 Feb 2009 00:17:25 -0500 [thread overview]
Message-ID: <431341160902132117s1696c975mbf20dfbdc65a7df3@mail.gmail.com> (raw)
In-Reply-To: <7v3aeh3a84.fsf@gitster.siamese.dyndns.org>
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.
>> 1) Right now, this command is actually git-submodule-split.sh. Should
>> I include this code directly into git-submodule.sh, or move it
>> to git-submodule--split.sh and hook it into git-submodule.sh?
>
> How about in contrib/ somewhere?
Sounds good to me! I'd like to include the unit tests and some
documentation, if that's OK.
I'll let you know when the patch has been reviewed, and submit it for
inclusion in contrib.
>> 2) Should I implement a --force flag based on filter-branch? Johannes
>> Schindelin has suggested that it might be better to remove the
>> --force flag from filter-branch and just rely on the reflog to keep
>> backups.
>
> Sounds sensible to me, but I do not have strong feeling about this either way.
I realized that there's a problem with removing --force from
filter-branch: The reflog doesn't contain backups of the rewritten
tags. So I'm afraid --force and the refs/original/ directory will need
to remain for now. (Any thoughts, Johannes?)
>> 4) We're obviously going to need to support revision arguments other
>> than --all (which is what we currently pass to filter-branch). Should
>> we default to the current branch only, or to --all?
>
> Matching what filter-branch defaults to would be the most natural,
> wouldn't it?
I think so, although many (or most?) users will probably want to use '-- --all'.
Thank you very much for your suggestions!
Cheers,
Eric
next prev parent reply other threads:[~2009-02-14 5:24 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 [this message]
2009-02-14 9:03 ` Lars Hjemli
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=431341160902132117s1696c975mbf20dfbdc65a7df3@mail.gmail.com \
--to=git@randomhacks.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=hjemli@gmail.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).