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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

>> 	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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux