Thread (11 messages) 11 messages, 5 authors, 2023-05-24

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

From: René Scharfe <hidden>
Date: 2023-05-24 20:29:55

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é
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help