From: Jens Lehmann <Jens.Lehmann@web.de>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 3/3] git submodule update should give notice when run without init beforehand
Date: Wed, 18 Sep 2013 21:13:34 +0200 [thread overview]
Message-ID: <5239FB5E.6060703@web.de> (raw)
In-Reply-To: <CALUzUxoFLOP=-ub_VYr6LqRYQXOO7Tf1oP95mxuYZo-8_dxAZw@mail.gmail.com>
Am 18.09.2013 12:12, schrieb Tay Ray Chuan:
> On Tue, Sep 17, 2013 at 1:06 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
>
> Thanks Jens for having a look!
>
>> Am 15.09.2013 19:38, schrieb Tay Ray Chuan:
>>> When 'update' is run with no path in a repository with uninitialized
>>> submodules, the program terminates with no output, and zero status code.
>>> Be more helpful to users by mentioning this.
>>
>> [snip] it would be rather nasty to error out on every submodule
>> update.
>
> Just to be sure we're on the right page, with this patch, the 'update'
> command still exits with status code zero (non-error), so this patch
> doesn't make it error out.
Ok, sorry for the confusion. But I still think we should not change
the default to print these messages, but make it an opt-in. And the
commit message (and maybe the documentation too) should talk about
the use cases where this makes sense.
>> After the 'autoinit' configuration (which lets upstream hint that
>> certain submodules should be initialized on clone) has materialzed we
>> might want to enable this error for these specific submodules.
>
> That's cool, I'm looking forward to this. Could you point me to
> somewhere detailing this?
Not yet. I'm still wrestling with the autoupdate series, which is
the logical step before autoinit. autoupdate enables to configure
that initialized submodules are updated on checkout, reset, merge
and all the other work tree manipulating commands. autoinit then
also clones the repos of submodules into .git/modules and inits
them in .git/config, so that autoupdate will automagically populate
them. Unfortunately autoupdate is a rather largish series touching
lots of commands and needing tons of tests ...
> But in the meantime, on top of the advice.* config, how about having a
> submodule.<name>.ignoreUninit config to disable the message on a
> per-submodule basis?
I'd not add such an option unless users request it because it helps
their not-so-terribly-specific use case.
>> But in
>> any case the error message should contain a hint on how you can get
>> rid of the error in case you know what you are doing ;-).
>
> The message does mention that you can throw in an --init to fix the
> problem. This "hint" is similar to what git-submodule prints when a
> <path> is passed (see region at line 807).
But for a lot of users that isn't a solution, as they never want to
init it, they want to ignore it. And if you explicitly ask to update
a special submodule, that message is ok.
next prev parent reply other threads:[~2013-09-18 19:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-15 17:38 [PATCH 1/3] t7406-submodule-update: add missing && Tay Ray Chuan
2013-09-15 17:38 ` [PATCH 2/3] t7406-submodule-update: demonstrate behaviour when run without init beforehand Tay Ray Chuan
2013-09-15 17:38 ` [PATCH 3/3] git submodule update should give notice " Tay Ray Chuan
2013-09-16 17:06 ` Jens Lehmann
2013-09-18 10:12 ` Tay Ray Chuan
2013-09-18 19:13 ` Jens Lehmann [this message]
[not found] ` <CALUzUxrf+ZGX8nQ0DVqYEyWto3Cos16VLTUfjsX99qnDLa=S6w@mail.gmail.com>
2013-09-19 10:25 ` Chris Packham
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=5239FB5E.6060703@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=rctay89@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).