Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v3] Let submodule command exit with error status if path does not exist

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:29

Heiko Voigt [off-list ref] writes:
Previously the exit status of git submodule was zero for various
subcommands even though the user specified an unknown path.
As any patch that fixes behaviour deals with "Previously", I'd
prefer to omit it and describe the current problem in present tense
instead.

Will queue with minor tweaks.  Thanks.
this is an updated version with your proposal incorporated. I changed
the name of check_unmatched to die_if_unmatched because IMO it describes
more clearly what the function is doing.
In general, I would actually prefer to call this kind of function
"check".  That way, all the call sites only need to be aware that
there is a check done there, without having to know what happens
when the check triggers, and the implementation of "check" could
decide that dying is too much and weaken the behaviour to only warn
in later updates.

Such an update would not easily apply for this particular case
because you would need to spit out all of @out from the module_list
before giving the "#unmatched" warning token, and find a way to
buffer the error message from ls-files so that it can be given when
the warning is issued at the end if we wanted to weaken this to
warn.  So in this particular case, I do not mind renaming it to
die-if.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help