Re: [PATCH] credential: let empty credential specs reset helper list

2016-02-26 Thread Junio C Hamano
Jeff King writes: > I think there is another reason, which is that the interface we expose > to config callbacks (and via "config --get-all") is to sequentially pass > in all values. How does that interact with this "reset"? For example, > what is the output of: > > git config

Re: [PATCH] credential: let empty credential specs reset helper list

2016-02-26 Thread Jeff King
On Fri, Feb 26, 2016 at 11:34:12AM -0800, Junio C Hamano wrote: > >> - if (!strcmp(key, "helper")) > >> - string_list_append(>helpers, value); > >> - else if (!strcmp(key, "username")) { > >> + if (!strcmp(key, "helper")) { > >> + if (*value) > >> +

Re: [PATCH] credential: let empty credential specs reset helper list

2016-02-26 Thread Jacob Keller
On Fri, Feb 26, 2016 at 11:34 AM, Junio C Hamano wrote: > > Of course, the code in the configuration subsystem for updated > version of Git needs to become aware of the new syntax, and those > that deal with the multi-value variables need custom code, which is > similar to the

Re: [PATCH] credential: let empty credential specs reset helper list

2016-02-26 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >> Sine the credential.helper key is a multi-valued config > > s/Sine/Since/; > >> diff --git a/credential.c b/credential.c >> index 7d6501d..aa99666 100644 >> --- a/credential.c >> +++ b/credential.c >> @@ -63,9

Re: [PATCH] credential: let empty credential specs reset helper list

2016-02-26 Thread Junio C Hamano
Jeff King writes: > Sine the credential.helper key is a multi-valued config s/Sine/Since/; > diff --git a/credential.c b/credential.c > index 7d6501d..aa99666 100644 > --- a/credential.c > +++ b/credential.c > @@ -63,9 +63,12 @@ static int credential_config_callback(const char

[PATCH] credential: let empty credential specs reset helper list

2016-02-26 Thread Jeff King
Sine the credential.helper key is a multi-valued config list, there's no way to "unset" a helper once it's been set. So if your system /etc/gitconfig sets one, you can never avoid running it, but only add your own helpers on top. Since an empty value for credential.helper is nonsensical (it would