git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2020, 18:17 UTC
Message-ID
<xmqqeev645zy.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.2002071621160.3718@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 12 quoted lines
>> 	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.

Previous: Johannes SchindelinNext: Junio C Hamano
Message 7 of 11 in “clone: use submodules.recurse option for automatically clone submodules”
  1. clone: use submodules.recurse option for automatically clone submodulesMarkus Klein via GitGitGadget, Jan 31, 2020
  2. Johannes SchindelinFeb 1, 2020
  3. clone: use submodules.recurse option for automatically clone submodulesMarkus Klein via GitGitGadget, Feb 4, 2020
  4. Johannes SchindelinFeb 5, 2020
  5. Junio C HamanoFeb 6, 2020
  6. Johannes SchindelinFeb 7, 2020
  7. Junio C HamanoFeb 7, 2020
  8. Junio C HamanoFeb 7, 2020
  9. AW: [PATCH v2] clone: use submodules.recurse option for automatically clone submodulesmasmiseim@gmx.de, Feb 24, 2020
  10. clone: use submodule.recurse option for automatically clone submodulesMarkus Klein via GitGitGadget, Feb 24, 2020
  11. clone: use submodule.recurse option for automatically clone submodulesMarkus Klein via GitGitGadget, May 1, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.