Re: [PATCH v3] builtin/submodule--helper.c: handle missing submodule URLs
From: Taylor Blau <hidden>
Date: 2023-05-24 20:36:52
From: Taylor Blau <hidden>
Date: 2023-05-24 20:36:52
On Wed, May 24, 2023 at 10:29:39PM +0200, René Scharfe wrote:
Am 24.05.23 um 21:51 schrieb Taylor Blau:quoted
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