From: Finn Arne Gangstad <finnag@pvv.org>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Roman Shaposhnik <rvs@sun.com>, Tim Harper <timcharper@gmail.com>,
git@vger.kernel.org
Subject: Re: Making submodules easier to work with
Date: Thu, 1 May 2008 20:38:37 +0200 [thread overview]
Message-ID: <20080501183837.GA4772@pvv.org> (raw)
In-Reply-To: <32541b130804301528k70ae2f7eq5229c0b4bb1d3788@mail.gmail.com>
On Wed, Apr 30, 2008 at 06:28:00PM -0400, Avery Pennarun wrote:
> On 4/30/08, Roman Shaposhnik <rvs@sun.com> wrote:
> > On Wed, 2008-04-30 at 17:48 -0400, Avery Pennarun wrote:
> > > It would be awesome if you could turn the fancy behaviour of this
> > > bundle into patches to git-submodule, for example, and then have your
> > > textmate macros call the modified git-submodule. It might be a bit of
> > > an uphill battle to get the patches accepted into the release, but I
> > > think it's worth the effort, as git-submodule in its current state is
> > > just a non-starter for my group at least.
> >
> > Doesn't the fact that the workflows around submodules tend to differ so
> > much call for different incarnations of git-submodule? IOW, wouldn't
> > it be ok to have an alternative to git-submodule somewhere in contrib?
>
> This would be okay with me. git-submodule itself doesn't seem to do
> anything very complex. I would be happy to help contribute to such a
> thing, as my group needs it rather desperately.
Where do we want to go with submodules?
Today, submodules seem to be a "read-only" implementation of the
supermodule. By that I mean that it is (only?) suited for creating a
supermodule that consists of independently released submodules, where
all development happens in the submodules, and you sometimes update
the supermodule to refer to a new version of a submodule.
What I've tried to achieve with submodules is a bit different: I want
most development to happen in the supermodule _as if_ the submodules
were part of the supermodule. There are two reasons for not doing it
with one big module: Total size can be a bit too big, but most
importantly, some submodules are shared between different super
modules and there is a certain level of synchronizing. Does this match
your scenarios in any way?
Simplified but realistic scenario [*]:
Supermodule "crawler" has some native code, and uses submodule "os-lib".
Supermodule "indexer" has some native code, and uses submodule "os-lib".
One group works on "crawler" and releases a new crawler every 3 months.
Another group works on "indexer" and releases a new indexer every 2 weeks.
The guy who wrote "os-lib" quit 2 years ago, and no one really
maintains it. Once a year or so someone might try to unify the
"os-lib" releases (so it should be POSSIBLE, just not the norm).
What I would like: People should be able to work on "crawler" as if it
was a single git repository, in particular this means:
o Branching "crawler" means branching "os-lib"
o You can send a patch that contains changes both to "crawler" and "os-lib"
and get it applied in a resonable way as ONE modification (and git-am
would do the right thing)
o Merging branch a and branch b in "crawler" also merges the matching
branches a and b in "os-lib".
o Pushing the supermodule also pushes the submodules
The branch names in "os-lib" can (and probably should) be mangled, so
they are a combination of the supermodule and the branch
name. E.g. something like crawler::branch, crawler/branch, or even
{crawler}.branch. (Is there a character that is currently not allowed in
branch names that can be used as an escape?)
Some lose implementation ideas: (code would be better, I know):
- Enable new behaviour with "git subdirectory" instead of "git submodule",
and let "git submodule" keep the old behaviour.
- subdirectories get the following magic additions:
- branching in parent creates {parent}.<branch> in subdirectories
- merging branches in parent merges the corresponding {parent}.branches
in subdirectories
- pushing a parent also pushes the subdirectories
- changing the parent to something that does not contain the subdirectory
is only allowed if the subdirectory is "clean" (no uncommitted changes).
[*] In reality: there are 300+ submodules, in all states from
"actively maintained" to "last person who understood the code left 10
years ago". There are maybe 5 or 10 supermodules.
- Finn Arne
next prev parent reply other threads:[~2008-05-01 19:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 4:08 Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules) Tim Harper
2008-04-30 4:47 ` Tim Harper
2008-04-30 6:14 ` Andreas Ericsson
2008-04-30 10:31 ` Johannes Schindelin
2008-04-30 16:47 ` Avery Pennarun
2008-04-30 17:21 ` Ping Yin
2008-04-30 19:55 ` Roman Shaposhnik
2008-04-30 20:26 ` Avery Pennarun
2008-04-30 20:19 ` Tim Harper
2008-04-30 20:31 ` Avery Pennarun
2008-04-30 21:37 ` Tim Harper
2008-04-30 21:48 ` Avery Pennarun
2008-04-30 22:23 ` Roman Shaposhnik
2008-04-30 22:28 ` Avery Pennarun
2008-05-01 18:38 ` Finn Arne Gangstad [this message]
2008-05-01 19:55 ` Making submodules easier to work with Avery Pennarun
2008-05-06 23:47 ` Roman Shaposhnik
2008-05-07 16:14 ` Avery Pennarun
2008-05-08 1:13 ` Ping Yin
2008-05-01 23:29 ` Steven Grimm
2008-05-06 23:17 ` Roman Shaposhnik
2008-05-01 4:56 ` Making submodules easier to work with (auto-update on checkout or merge, stash & restore submodules) Ping Yin
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=20080501183837.GA4772@pvv.org \
--to=finnag@pvv.org \
--cc=apenwarr@gmail.com \
--cc=git@vger.kernel.org \
--cc=rvs@sun.com \
--cc=timcharper@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).