From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
Git List <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: Composing git repositories
Date: Wed, 27 Mar 2013 17:19:38 +0530 [thread overview]
Message-ID: <CALkWK0kNH2A4eLML22RTofarR3MB++OECiNXMi-bWLLMWK1GAg@mail.gmail.com> (raw)
In-Reply-To: <7vmwtqt8rs.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> So you have to stash it somewhere. We could have made it to move
> them to $HOME/.safeplace or somewhere totally unrelated to the
> superproject. So in that sense, the repositories are *not* owned by
> the superproject in any way. However, you are working within the
> context of the superproject on the submodule after all, and
> somewhere under $GIT_DIR/ of the superorject is not too wrong a
> place to use as such a safe place.
Thanks for the explanation. The paths in .git/modules are unnecessary
ugly and unwieldy, especially in the case of multiple levels of
nesting: I'll look into converting it to a flat structure using
<repository name>.git, while handling name conflicts. I'll also look
into adding a feature to relocate this/ using an object store from an
existing clone.
> Look for floating submodules in the list archive.
The most relevant message thread I could find was [1], back from 2011.
You argue that floating submodules are Wrong, and that there is no
real usecase for it.
Like I explained earlier, I'm looking at one tool that solves a
superset of the problems mr, repo, submodules, subtrees, and other
tools solve. I really like the way repo allows me to work on a meta
project like Android or ChromiumOS, but hate that it allows for zero
composition.
To move forward, I have the following design thoughts (elaborating on
my previous email):
1. If .gitmodules is tracked like a normal file, it is absolutely
impossible to tell the possible dependencies of the superproject
without cloning it entirely, and looking at the .gitmodules file in
each of the branches. Can't we have it as a special ref instead, so I
can `git fetch` just that ref to figure out the dependencies?
2. True composition requires that I be able to specify the entire
manifest (for nested submodules) in the toplevel .gitmodules, or break
it up as I see fit. This is currently impossible, and brings us back
to #1: the manifest for b/, b/c are in the toplevel repo's special
ref, and I need to fetch c's special ref to figure out what d is (or
error out if no such thing exists).
3. True floating submodules are impossible, because a change in the
submodule means a change in the commit object referenced by the
superproject's tree object; diff-tree will see that some content has
changed in the repository. We can represent that diff however we want
(using diff.submodule), but we can't change the fact that the change
has to be committed. Fixing this will require nothing short of
introducing a new kind of object (say "submodule" object which can be
a concrete SHA-1 or point to a ref).
Do you think thinking about these things is worthwhile? I see more
complaints like [2] as git adoption in the industry increases, but we
have no solution: we can't make git scale to super-large repositories,
and we have no real way to compose smaller repositories. Hacks like
repo sadden me.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/185164
[2]: http://thread.gmane.org/gmane.comp.version-control.git/189776
next prev parent reply other threads:[~2013-03-27 11:50 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 7:56 Composing git repositories Ramkumar Ramachandra
2013-03-26 16:39 ` Junio C Hamano
2013-03-27 11:49 ` Ramkumar Ramachandra [this message]
2013-03-27 16:06 ` Junio C Hamano
2013-03-27 17:02 ` Ramkumar Ramachandra
2013-03-27 17:16 ` Junio C Hamano
2013-03-27 19:26 ` Jonathan Nieder
2013-03-27 20:18 ` Junio C Hamano
2013-03-27 20:42 ` Jonathan Nieder
2013-03-28 11:48 ` Ramkumar Ramachandra
2013-03-28 20:25 ` Jens Lehmann
2013-03-28 10:01 ` Ramkumar Ramachandra
2013-03-28 18:21 ` Jonathan Nieder
2013-03-28 20:17 ` Jens Lehmann
2013-03-27 23:02 ` Jens Lehmann
2013-03-28 9:16 ` Ramkumar Ramachandra
2013-03-28 20:40 ` Jens Lehmann
2013-03-31 20:34 ` Ramkumar Ramachandra
2013-03-31 22:57 ` Jonathan Nieder
2013-04-02 17:44 ` Ramkumar Ramachandra
2013-04-02 17:58 ` Jeff King
2013-04-02 19:33 ` Ramkumar Ramachandra
2013-04-02 19:56 ` Jens Lehmann
2013-04-02 18:03 ` Junio C Hamano
2013-04-04 6:40 ` Junio C Hamano
2013-04-05 2:36 ` Duy Nguyen
2013-04-05 4:53 ` Junio C Hamano
2013-04-05 5:27 ` Duy Nguyen
2013-04-05 7:15 ` Jens Lehmann
2013-03-31 23:50 ` Phil Hord
2013-04-01 12:14 ` Jens Lehmann
2013-04-01 14:49 ` Phil Hord
2013-04-02 18:35 ` Ramkumar Ramachandra
2013-04-02 18:54 ` Jonathan Nieder
2013-04-02 19:09 ` Junio C Hamano
2013-04-02 19:11 ` Ramkumar Ramachandra
2013-04-02 19:20 ` Jonathan Nieder
2013-04-02 19:29 ` Ramkumar Ramachandra
2013-04-02 19:49 ` Ramkumar Ramachandra
2013-04-02 19:59 ` Jens Lehmann
2013-04-01 9:50 ` Jens Lehmann
2013-04-01 0:16 ` Seth Robertson
2013-04-02 19:19 ` Ramkumar Ramachandra
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=CALkWK0kNH2A4eLML22RTofarR3MB++OECiNXMi-bWLLMWK1GAg@mail.gmail.com \
--to=artagnon@gmail.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).