Thread (1 message) 1 message, 1 author, 2020-02-07

Re: [PATCH v2] clone: use submodules.recurse option for automatically clone submodules

From: Junio C Hamano <hidden>
Date: 2020-02-07 18:17:14

Johannes Schindelin [off-list ref] writes:
quoted
	if (!strcmp(var, "submodule.recurse")) {
		if (git_config_bool(var, value))
			...
		return 0; /* done with the variable either way */
	}

is more appropriate.
Good catch, and I think you will have to do even more: in the "else" case,
it is possible that the user overrode a `submodule.recurse` from the
system config in their user-wide config, so we must _undo_ the
`string_list_append().
Yeah, I tend to agree that submodule.recurse should not be made into
a multi-valued fields with this change; it should stay to be the
usual last-one-wins single boolean.
Further, it is probably not a good idea to append "true" _twice_ if
multiple configs in the chain specify `submodule.recurse = true`.
The user of this list in cmd_clone() first sorts and dedups, so
appending the same is OK, even though it may appear sloppy.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help