git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avery Pennarun <apenwarr@gmail.com>
To: Henk <henk_westhuis@hotmail.com>
Cc: git@vger.kernel.org
Subject: Re: Submodules and merge conflicts
Date: Thu, 21 May 2009 16:31:39 -0400	[thread overview]
Message-ID: <32541b130905211331u47be06afrcff2e01f0c666680@mail.gmail.com> (raw)
In-Reply-To: <1242912120853-2951928.post@n2.nabble.com>

On Thu, May 21, 2009 at 9:22 AM, Henk <henk_westhuis@hotmail.com> wrote:
> Instead of using the sha1 of a specific revision in the submodule, I would
> find it more logical to use a branch-name or tag. This way you can commit on
> the submodule without having to commit the new submodule revision to the
> main repository also.
>
> I would like to hear your thoughts on this. Maybe we are using submodules
> wrong, or maybe this is already possible.

The primary advantage of the git submodule code is the ability to lock
to a specific sha1.  If you don't want to do that, you're not going to
get much benefit from using submodules.

One option here is to simply skip the 'git submodule' altogether and
just have a script that checks out the other git repositories into
subdirs.  Then you have total control over which branches, etc are
included, the changes to the script (eg. to change which branch you
want to use) can be merged just like changes to anything else.

We do something in between on our internal projects: we use git
submodules to lock in the sha-1 (it's really valuable to know
*exactly* which version of everything was used in a particular
release), but we have scripts to auto-update the sha-1 for each
submodule to the tip of the right branches.

For some other projects, we also use the git-subtree tool I developed
(http://alumnit.ca/~apenwarr/log/?m=200904#30) but given that your
submodules are huge things like the Linux kernel, it's probably not
appropriate in your case.  You might want to look at it anyway in case
I'm wrong.

Have fun,

Avery

      reply	other threads:[~2009-05-21 20:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21 13:22 Submodules and merge conflicts Henk
2009-05-21 20:31 ` Avery Pennarun [this message]

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=32541b130905211331u47be06afrcff2e01f0c666680@mail.gmail.com \
    --to=apenwarr@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=henk_westhuis@hotmail.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).