git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <dag@cray.com>
To: Hilco Wijbenga <hilco.wijbenga@gmail.com>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: organizing multiple repositories with dependencies
Date: Tue, 17 Apr 2012 15:51:58 -0500	[thread overview]
Message-ID: <nng1unmnksx.fsf@transit.us.cray.com> (raw)
In-Reply-To: <CAE1pOi29dKd2LHW7MJ+TTN4HzFkOPFEyf7Sf2emSsBYm93uYUA@mail.gmail.com> (Hilco Wijbenga's message of "Tue, 17 Apr 2012 12:55:19 -0700")

Hilco Wijbenga <hilco.wijbenga@gmail.com> writes:

> If you work on a subproject (in its own repo) then a subsequent pull
> in the umbrella project should bring this new code into the umbrella
> project (assuming that would make sense given the branches involved).

I don't necessarily think this is always what should happen.  I can't
comment on git-submodule since I haven't used it in its more recent
incarnation, but one thing I like about git-subtree is that it's
explicit.  I have to do a "git subtree pull" on the umbrella project to
pull in the new changes from a subproject.  That gives me some degree of
control over when to update sources.  I suspect one can do the same by
using "git pull" in submodule directories.

If you want the behavior you describe, a post-receive hook on the
component repositories is easy to implement.  I just did that a couple
of weeks ago for a subtree-aggregated repository.  When a component
receives something it immediately does a "git subtree pull" on a
workarea on the server and then does a push from that workarea to the
subtree-aggregated repository.

Of course, this is entirely driven by git-subtree's model of actually
incorporating subproject history into one big umbrella repository.
There is no separation between the subprojects and umbrella projects.
It's one giant history.  Therefore, push/pull to/from subprojects are
explicit operations.  That's probably not the best model for every
situation but I find it very nice.

> After rereading my earlier reply I felt that it might be interpreted
> as being disparaging of submodules/subtree/gitslave.

I didn't interpret it that way at all.  I agree with you that
subproject/superproject support could be much better.  But I don't agree
that we'll be able to design one model that works for everyone.  svn
externals are just one model to aggregate projects but it is not the
only one.  It just happens that no one working on Subversion bothered to
implement anything else.

Perhaps a good way to go would be to provide the basic operations (I
think we have most of that) and some hooks in contrib/ or elsewere to
implement various models.  Just like git imposes no particular workflow
model I don't think git should impose one particular aggregation model.
What we do need is better documentation of what the various models and
tools are.  For example, I would find a subtree/submodule comparison
highly valuable.  It would help people decide which model is best for
them.

                                -Dave

  reply	other threads:[~2012-04-17 20:52 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16  9:27 organizing multiple repositories with dependencies Namit Bhalla
2012-04-16 14:30 ` Jakub Narebski
2012-04-16 20:08   ` dag
2012-04-17 17:29     ` Hilco Wijbenga
2012-04-17 17:51       ` dag
2012-04-17 18:37       ` Seth Robertson
2012-04-17 19:55         ` Hilco Wijbenga
2012-04-17 20:51           ` dag [this message]
2012-04-17 21:43             ` Hilco Wijbenga
2012-04-17 22:25               ` PJ Weisberg
2012-04-17 22:49                 ` Hilco Wijbenga
2012-04-18 10:15                   ` Namit Bhalla
2012-04-18 12:09               ` Jens Lehmann
2012-04-24 17:17               ` dag
2012-04-24 18:54                 ` Hilco Wijbenga
2012-04-24 21:09                   ` PJ Weisberg
2012-04-24 22:04                     ` Hilco Wijbenga
2012-04-24 23:33                   ` dag
2012-04-30 19:25                     ` Phil Hord
2012-04-30 19:43                       ` dag
2012-04-18 12:19             ` Jens Lehmann
2012-04-24 17:22               ` dag
2012-04-24 17:59                 ` Seth Robertson
2012-04-24 20:26                   ` Jens Lehmann
2012-04-24 20:52                     ` Seth Robertson
2012-04-24 23:21                     ` dag
2012-04-28 17:31                       ` username localhost
2012-04-24 23:25                   ` dag
2012-04-25 12:48                     ` Seth Robertson
2012-04-27 14:23                       ` dag
2012-04-24 19:48 ` Eugene Sajine
2012-04-24 22:11   ` Hilco Wijbenga
2012-04-24 23:38     ` dag
2012-04-24 23:36   ` dag

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=nng1unmnksx.fsf@transit.us.cray.com \
    --to=dag@cray.com \
    --cc=git@vger.kernel.org \
    --cc=hilco.wijbenga@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).