git@vger.kernel.org mailing list mirror (one of many)
 help / Atom feed
From: Lars Schneider <larsxschneider@gmail.com>
To: Brandon Williams <bmwill@google.com>
Cc: Stefan Beller <sbeller@google.com>, Heiko Voigt <hvoigt@hvoigt.net>, Junio C Hamano <gitster@pobox.com>, "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: [PATCH] pull: respect submodule update configuration
Date: Tue, 22 Aug 2017 16:50:06 +0200
Message-ID: <D44F6340-9011-4D41-B103-4A61E7248806@gmail.com> (raw)
In-Reply-To: <20170821182110.GA156514@google.com>


> On 21 Aug 2017, at 20:21, Brandon Williams <bmwill@google.com> wrote:
> 
> On 08/21, Stefan Beller wrote:
>> On Mon, Aug 21, 2017 at 10:20 AM, Lars Schneider
>> <larsxschneider@gmail.com> wrote:
>>> 
>>>> On 21 Aug 2017, at 18:55, Stefan Beller <sbeller@google.com> wrote:
>>>> 
>>>> On Mon, Aug 21, 2017 at 9:20 AM, Heiko Voigt <hvoigt@hvoigt.net> wrote:
>>>> 
>>>>>> So I am a bit curious to learn which part of this change you dislike
>>>>>> and why.
>>>>> 
>>>>> I am also curious. Isn't this the same strategy we are using in other
>>>>> places?
>>>>> 
>>>> 
>>>> I dislike it because the UX feels crude.  When reading the documentation,
>>>> it seems to me as if submodule.<name> can be one of the following
>>>> 
>>>>   (none, checkout, rebase, merge, !<custom-command>)
>>>> 
>>>> This is perfect for "submodule-update", whose primary goal is
>>>> to update submodules *somehow*. However other commands
>>>> 
>>>>   git rebase --recurse
>>>>   git merge --recurse
>>>>   git checkout --recurse
>>>> 
>>>> have a different primary mode of operation (note how their name
>>>> is one of the modes from the set above), so it may get confusing
>>>> for a user.
>>>> 
>>>> 'none'  and '!<custom-command>' seem like they would be okay
>>>> for any of the commands above but then:
>>>> 
>>>>   git config submodule.<name>.update "!..."
>>>>   git reset --hard --recurse
>>>>   git status
>>>>   # submodule is reported, because "!..." did not 'reset'.
>>>> 
>>>> Anyway. That dislike is just a minor gut feeling about the UX/UI
>>>> being horrible. I wrote the patch to keep the conversation going,
>>>> and if it fixes Lars problem, let's take it for now.
>>> 
>>> Well, I need just a way to disable certain Submodules completely.
>>> If you show me how "git config --local submodule.sub.active false"
>>> works then I don't need this patch.
> 
> Yeah if you want to completely disable a submodule (as in not even check
> it out) then setting .active to false would do that.  But as stefan
> pointed out and IIRC 'submodule update --init' with no pathspec sets all
> submodules to be active.  Perhaps it should only init submodules who
> don't already have an explicit active flag set.

OK. I change my scripts to use ".active" and it seems to work nicely.

I noticed one oddity, though:

If I clone a repo using `git clone --recursive <url>` then the local
Git config of the repo gets the following entry:

[submodule]
	active = .

Is this intentional? Something in the git/git test harness seems to prevent
that. I was not able to write a test to replicate the issue.

Any idea?

Thanks,
Lars

  parent reply index

Thread overview: 38+ messages in thread (expand / mbox.gz / Atom feed / [top])
2017-08-16 18:35 Submodule regression in 2.14? Lars Schneider
2017-08-16 18:51 ` Stefan Beller
2017-08-16 18:53   ` Stefan Beller
2017-08-17 21:21   ` Lars Schneider
2017-08-17 21:55     ` Stefan Beller
2017-08-18  2:13       ` Junio C Hamano
2017-08-18  4:02         ` Stefan Beller
2017-08-18 16:50           ` Junio C Hamano
2017-08-18 19:09             ` Stefan Beller
2017-08-19  6:51               ` Junio C Hamano
2017-08-21 16:05                 ` Heiko Voigt
2017-08-21 16:42                   ` Stefan Beller
2017-08-22 15:33                     ` Heiko Voigt
2017-08-22 18:10                       ` Stefan Beller
2017-08-25  9:10                         ` Heiko Voigt
2017-08-25 16:38                           ` Stefan Beller
2017-08-25 16:53                           ` Junio C Hamano
2017-08-21 16:48                   ` Junio C Hamano
2017-08-22 15:50                     ` Heiko Voigt
2017-08-21 16:46                 ` Stefan Beller
2017-08-21 22:45                   ` Junio C Hamano
2017-08-18 13:12       ` Lars Schneider
2017-08-18 17:16         ` Stefan Beller
2017-08-18 19:10           ` Junio C Hamano
2017-08-18 22:04             ` [PATCH] pull: respect submodule update configuration Stefan Beller
2017-08-18 22:05               ` Stefan Beller
2017-08-19  6:17                 ` Junio C Hamano
2017-08-19  6:24               ` Junio C Hamano
2017-08-21 16:20                 ` Heiko Voigt
2017-08-21 16:55                   ` Stefan Beller
2017-08-21 17:20                     ` Lars Schneider
2017-08-21 17:48                       ` Stefan Beller
2017-08-21 18:21                         ` Brandon Williams
2017-08-21 22:52                           ` Junio C Hamano
2017-08-22 14:50                           ` Lars Schneider [this message]
2017-08-22 17:51                             ` Stefan Beller
2017-08-22 18:55                               ` Brandon Williams
2017-08-19 18:24           ` Submodule regression in 2.14? Lars Schneider

Reply instructions:

You may reply publically 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 to all the recipients using the --to, --cc,
  and --in-reply-to switches of git-send-email(1):

  git send-email \
    --in-reply-to=D44F6340-9011-4D41-B103-4A61E7248806@gmail.com \
    --to=larsxschneider@gmail.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=hvoigt@hvoigt.net \
    --cc=sbeller@google.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

git@vger.kernel.org mailing list mirror (one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.org/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox