git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: Max Krasnyansky <maxk@qualcomm.com>
Cc: git@vger.kernel.org
Subject: Re: Auto update submodules after merge and reset
Date: Wed, 30 Nov 2011 09:31:14 +0100	[thread overview]
Message-ID: <4ED5E9D2.4060503@web.de> (raw)
In-Reply-To: <4ED57EED.4040705@qualcomm.com>

Am 30.11.2011 01:55, schrieb Max Krasnyansky:
> Does anyone have a pointer to a thread/discussion that explains why git submodules are not auto
> updated when the superproject is updated (merge, reset, etc) by default?

This is because in current git a submodules work tree gets only updated
when running "git submodule update". A default auto update wouldn't be
backwards compatible (and some users really like it the way it is now).
I'm working on a patch series to teach Git to optionally update the
submodules work trees on checkout, reset merge and so on, but I'm not
there yet.

> Assuming a simple and default setup where submodule update policy is set to "checkout".
> It seems that the default and sane behavior should be to update (checkout) corresponding submodule
> commit to track the superproject.

I agree, but we should decide about a sane default when the feature is
there. In the first version it will be off by default, so people can make
up their minds about breaking backwards compatibility.

> I can't seem to find convincing explanation why it's not the case :). Having to manually update
> submodules after pull or reset has been error prone and confusing for the devs I work with.

Yes, we even had some mis-merges because of that.

> I'm thinking about adding a config option that would enable automatic submodule update but wanted
> to see if there is some fundamental reason why it would not be accepted.

I think adding something like an "submodule.autoupdate" config makes lots
of sense, but IMO it should affect all work tree updating porcelain commands,
not just merge.

  reply	other threads:[~2011-11-30  8:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30  0:55 Auto update submodules after merge and reset Max Krasnyansky
2011-11-30  8:31 ` Jens Lehmann [this message]
2011-12-06  1:06   ` Max Krasnyansky
2011-12-06 21:32     ` Jens Lehmann
2011-12-07  9:07   ` Andreas T.Auer
2011-12-07 22:23     ` Jens Lehmann
2011-12-08  9:13       ` andreas.t.auer_gtml_37453
2011-12-09 23:57         ` Phil Hord
2011-12-10  1:41           ` Andreas T.Auer
2011-12-11 14:43             ` Phil Hord
2011-12-11 21:15           ` Andreas T.Auer
2011-12-12 22:39             ` Jens Lehmann
2011-12-12 23:43               ` Phil Hord
2011-12-13  7:52                 ` Jens Lehmann
2011-12-13  9:45               ` Andreas T.Auer
2011-12-13 21:44                 ` Jens Lehmann
2011-12-13 23:05                   ` Andreas T.Auer
2011-12-14 15:16                     ` Marc Branchaud

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=4ED5E9D2.4060503@web.de \
    --to=jens.lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=maxk@qualcomm.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).