git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/3] git submodule update should give notice when run without init beforehand

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Sep 18, 2013, 10:12 UTC
Message-ID
<CALUzUxoFLOP=-ub_VYr6LqRYQXOO7Tf1oP95mxuYZo-8_dxAZw@mail.gmail.com>
In-Reply-To
<52373AA2.9050807@web.de>
On Tue, Sep 17, 2013 at 1:06 AM, Jens Lehmann <Jens.Lehmann@web.de> wrote:
Thanks Jens for having a look!
Show 7 quoted lines
> 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.

> 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?

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?

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

-- 
Cheers,
Ray Chuan
Previous: Jens LehmannNext: Jens Lehmann
Message 5 of 7 in “t7406-submodule-update: add missing &&”
  1. 1/3 t7406-submodule-update: add missing &&Tay Ray Chuan, Sep 15, 2013
  2. 2/3 t7406-submodule-update: demonstrate behaviour when run without init beforehandTay Ray Chuan, Sep 15, 2013
  3. 3/3 git submodule update should give notice when run without init beforehandTay Ray Chuan, Sep 15, 2013
  4. Jens LehmannSep 16, 2013
  5. Tay Ray ChuanSep 18, 2013
  6. Jens LehmannSep 18, 2013
  7. Chris PackhamSep 19, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.