From: "Andreas Köhler" <andi5.py@gmx.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jens Lehmann <Jens.Lehmann@web.de>,
Maarten Billemont <lhunath@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: ''git submodule sync'' should not add uninitialized submodules to .git/config
Date: Fri, 24 Jun 2011 01:10:29 +0200 [thread overview]
Message-ID: <4E03C7E5.4050008@gmx.net> (raw)
In-Reply-To: <7vboxo2ne9.fsf@alter.siamese.dyndns.org>
Am 24.06.2011 00:28, schrieb Junio C Hamano:
---8<---
> Subject: submodule sync: do not auto-vivify uninteresting submodule
>
> Earlier 33f072f (submodule sync: Update "submodule.<name>.url" for empty
> directories, 2010-10-08) attempted to fix a bug where "git submodule sync"
> command does not update the URL if the current superproject does not have
> a checkout of the submodule.
>
> However, it did so by unconditionally registering submodule.$name.url to
> every submodule in the project, even the ones that the user has never
> showed interest in at all by running 'git submodule init' command. This
> caused subsequent 'git submodule update' to start cloning/updating submodules
> that are not interesting to the user at all.
>
> Update the code so that the URL is updated from the .gitmodules file only
> for submodules that already have submodule.$name.url entries, i.e. the
> ones the user has showed interested in having a checkout.
---8<---
I think that describes the situation pretty well and the patch looks
good. I will not be able to test it before next week though, do not wait
for me.
There are two minor issues for me left.
(1) The man page of submodule sync talks about "all submodules" and not
"registered submodules". I treated it as "subsequent init" and
personally do not restrict the list of submodules, simply because my
build would not work without them.
(2) It is confusing to have registered submodules in .git/config without
a matching gitlink. Say, you switch between branch a1 with a submodule s
with url u1, to a branch without s, you git clean -xdff (url u1 is still
in .git/config, right?), and then to a branch a2 with s pointing to url
u2. This bugged me.
Ciao,
-- andi5
next prev parent reply other threads:[~2011-06-23 23:10 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
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 [this message]
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=4E03C7E5.4050008@gmx.net \
--to=andi5.py@gmx.net \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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).