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

Re: [PATCH v3] builtin/submodule--helper.c: handle missing submodule URLs

From
Taylor Blau <me@ttaylorr.com>
Date
May 24, 2023, 20:36 UTC
Message-ID
<ZG51XsEq4JB9IK33@nand.local>
In-Reply-To
<c8d32d5a-9803-9eb7-baaa-49b4521f0c37@web.de>
On Wed, May 24, 2023 at 10:29:39PM +0200, René Scharfe wrote:
Show 8 quoted lines
> Am 24.05.23 um 21:51 schrieb Taylor Blau:
>
> > By adding a NULL-ness check on `sub->url`, we'll fall into the 'else'
> > branch, setting `url` to `sub->url` (which is NULL). Before attempting
> > to invoke `git submodule--helper clone`, check whether `url` is NULL,
> > and die() if it is.
>
> Why die() here instead of just warn and skip as well?

That's a good point. When I read prepare_to_clone_next_submodule(), I thought that it was already too late to skip that submodule. But my understanding was incorrect, we could easily issue a warning() and return '0', which would indicate to skip it.

But I concur with Junio earlier in the thread that we don't have to rush things to get this into -rc2 or even 2.41, since this bug has been with us since v2.20.0.

Thanks, Taylor

Previous: René ScharfeNext: Jeff King
Message 9 of 12 in “[BUG] Segmentation fault in git v2.41.0.rc1”
  1. Tribo DarMay 24, 2023
  2. Taylor BlauMay 24, 2023
  3. builtin/submodule--helper.c: handle missing submodule URLsTaylor Blau, May 24, 2023
  4. builtin/submodule--helper.c: handle missing submodule URLsTaylor Blau, May 24, 2023
  5. Eric SunshineMay 24, 2023
  6. Taylor BlauMay 24, 2023
  7. builtin/submodule--helper.c: handle missing submodule URLsTaylor Blau, May 24, 2023
  8. René ScharfeMay 24, 2023
  9. Taylor BlauMay 24, 2023
  10. Jeff KingMay 24, 2023
  11. Jeff KingMay 24, 2023
  12. Junio C HamanoMay 24, 2023

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.