From: Stefan Beller <sbeller@google.com>
To: Kannan Goundan <kannan@cakoose.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
Jonathan Nieder <jrnieder@gmail.com>,
Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: Make "git checkout" automatically update submodules?
Date: Fri, 23 Oct 2015 10:20:15 -0700 [thread overview]
Message-ID: <CAGZ79kYMyU5h8uQkNEpMU558FgLrNM52_aQsXud6CrBAUgFSNA@mail.gmail.com> (raw)
In-Reply-To: <loom.20151016T001449-848@post.gmane.org>
On Thu, Oct 15, 2015 at 3:50 PM, Kannan Goundan <kannan@cakoose.com> wrote:
> Git submodules seem to be a great fit for one of our repos. The biggest
> pain point is that it's too easy to forget to update submodules.
>
> 1. I often forget since most repos don't need it.
> 2. Infrequent users of our repo almost never know to update submodules and
> end up coming to us with strange build errors.
> 3. Existing scripts that work with Git repos are usually not built to handle
> submodules.
>
> In the common case of the submodule content having no local edits, it would
> be nice if "git checkout" automatically updated submodules [1]. If there
> are local edits, it could error out (maybe override with
> "--ignore-modified-submodules" or something).
>
> I'm not a Git expert, though. Is there a reason something like this isn't
> already implemented? Maybe there's an existing write-up or mailing list
> thread I can read to get some background information?
>
> Thanks!
>
> [1] Our post-checkout procedure is:
>
> git submodule sync
> git submodule update --init
> git submodule foreach --recursive \
> 'git submodule sync ; git submodule update --init'
>
> (Not sure if this is correct. Different articles/blogs suggest a slightly
> different set of commands.)
>
Checkout [1]. There are lots of good patches, but hard to find.
(Including, but not limited to a recursive git checkout enhancement!)
That said I've recently started working on submodules, too.
I am trying to push my work upstream as fast as possible
as that works best for us.
[1] https://github.com/jlehmann/git-submod-enhancements/wiki
next prev parent reply other threads:[~2015-10-23 17:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 22:50 Make "git checkout" automatically update submodules? Kannan Goundan
2015-10-15 23:21 ` Junio C Hamano
2015-10-22 23:46 ` Make Kannan Goundan
2015-10-23 2:05 ` Make Junio C Hamano
2015-10-23 3:46 ` Make "git checkout" automatically update submodules? Kannan Goundan
2015-10-23 6:19 ` Christian Couder
2015-10-23 17:15 ` Junio C Hamano
2015-10-23 17:20 ` Stefan Beller [this message]
2015-10-23 19:11 ` Junio C Hamano
2015-10-23 22:51 ` Kannan Goundan
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGZ79kYMyU5h8uQkNEpMU558FgLrNM52_aQsXud6CrBAUgFSNA@mail.gmail.com \
--to=sbeller@google.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=kannan@cakoose.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).