git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Hord <hordp@cisco.com>
To: Maarten Billemont <lhunath@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: ''git submodule sync'' should not add uninitialized submodules to .git/config
Date: Thu, 23 Jun 2011 09:39:42 -0400	[thread overview]
Message-ID: <4E03421E.1000208@cisco.com> (raw)
In-Reply-To: <0D2618D7-0681-4E71-B412-36D490D45B9D@gmail.com>

On 06/23/2011 07:13 AM, Maarten Billemont wrote:
> When I initialize 2/3 submodules of my git repository and do git submodule update, all is fine: Only the 2 submodules that I need are updated.
>
> When I run a git submodule sync to update the URLs that may have been changed in .gitmodules, it ADDS the URL of the submodule that was NOT initialized, thus "initializing" it.
>
> Now, when I run git submodule update, it starts checking out the third module and my workflow is broken.
>
> git submodule sync should not add entries to .git/config, only update existing ones.--

Maarten,

Is it enough to similarly limit 'submodule sync' the same way you did
with 'submodule init'? Like this:
git submodule sync -- A B

From 'git help submodule':
"git submodule sync" synchronizes all submodules while "git submodule
sync — A" synchronizes submodule "A" only.

Phil

  reply	other threads:[~2011-06-23 13:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23 11:13 ''git submodule sync'' should not add uninitialized submodules to .git/config Maarten Billemont
2011-06-23 13:39 ` Phil Hord [this message]
2011-06-23 14:35 ` Junio C Hamano
2011-06-23 19:14   ` Jens Lehmann
2011-06-23 22:28     ` Junio C Hamano
2011-06-23 23:10       ` Andreas Köhler
2011-06-24  6:17         ` Jens Lehmann
2011-06-24  4:13       ` Re* " Junio C Hamano
2011-06-24  6:20         ` Jens Lehmann
2011-06-25 23:26         ` [PATCH] submodule add: always initialize .git/config entry Jens Lehmann
2011-06-30  0:47           ` Junio C Hamano
2011-06-25 20:41       ` [PATCH v2] submodule sync: do not auto-vivify uninteresting submodule Jens Lehmann
2011-06-23 20:01   ` ''git submodule sync'' should not add uninitialized submodules to .git/config Phil Hord
2011-06-23 21:47     ` Junio C Hamano
2011-06-23 23:06       ` Phil Hord

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=4E03421E.1000208@cisco.com \
    --to=hordp@cisco.com \
    --cc=git@vger.kernel.org \
    --cc=lhunath@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).