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é