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
René Scharfe <l.s.r@web.de>
Date
May 24, 2023, 20:29 UTC
Message-ID
<c8d32d5a-9803-9eb7-baaa-49b4521f0c37@web.de>
In-Reply-To
<ae6cf3fa461b85e346f034371dae56a2790dfa20.1684957882.git.me@ttaylorr.com>
Am 24.05.23 um 21:51 schrieb Taylor Blau:
> There is no need to check whether `sub`
> itself is NULL, since we already perform this check earlier in
> `prepare_to_clone_next_submodule()`.

Right, and if "sub" is NULL then next_submodule_warn_missing() is called and prepare_to_clone_next_submodule() is exited early.

> 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?
René
Previous: Taylor BlauNext: Taylor Blau
Message 8 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.