All of lore.kernel.org
 help / color / mirror / Atom feed
* Make "git checkout" automatically update submodules?
@ 2015-10-15 22:50 Kannan Goundan
  2015-10-15 23:21 ` Junio C Hamano
  2015-10-23 17:20 ` Stefan Beller
  0 siblings, 2 replies; 10+ messages in thread
From: Kannan Goundan @ 2015-10-15 22:50 UTC (permalink / raw)
  To: git

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.)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-10-23 22:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-10-23 19:11   ` Junio C Hamano
2015-10-23 22:51   ` Kannan Goundan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.