Re: [PATCH] refs: parse_hide_refs_config to use parse_config_key

2017-02-24 Thread Jeff King
On Fri, Feb 24, 2017 at 01:18:48PM -0800, Junio C Hamano wrote: > > While I'm thinking about it, here are patches to do that. The third one > > I'd probably squash into yours (after ordering it to the end). > > > > [1/3]: parse_config_key: use skip_prefix instead of starts_with > > [2/3]: pars

Re: [PATCH] refs: parse_hide_refs_config to use parse_config_key

2017-02-24 Thread Junio C Hamano
Jeff King writes: > On Fri, Feb 24, 2017 at 01:18:48PM -0800, Junio C Hamano wrote: > >> > While I'm thinking about it, here are patches to do that. The third one >> > I'd probably squash into yours (after ordering it to the end). >> > >> > [1/3]: parse_config_key: use skip_prefix instead of st

Re: [PATCH] refs: parse_hide_refs_config to use parse_config_key

2017-02-24 Thread Junio C Hamano
Jeff King writes: > On Fri, Feb 24, 2017 at 03:39:40PM -0500, Jeff King wrote: > >> This will start parsing "receive.foobar.hiderefs", which we don't want. >> I think you need: >> >> !parse_config_key(var, section, &subsection, &subsection_len, &key) && >> !subsection && >> !strcmp(key, "h

Re: [PATCH] refs: parse_hide_refs_config to use parse_config_key

2017-02-24 Thread Jeff King
On Fri, Feb 24, 2017 at 03:39:40PM -0500, Jeff King wrote: > This will start parsing "receive.foobar.hiderefs", which we don't want. > I think you need: > > !parse_config_key(var, section, &subsection, &subsection_len, &key) && > !subsection && > !strcmp(key, "hiderefs") > > Perhaps passin

Re: [PATCH] refs: parse_hide_refs_config to use parse_config_key

2017-02-24 Thread Junio C Hamano
Stefan Beller writes: > parse_config_key was introduced in 1b86bbb0ade (config: add helper > function for parsing key names, 2013-01-22), the NEEDSWORK that is removed > in this patch was introduced at daebaa7813 (upload/receive-pack: allow > hiding ref hierarchies, 2013-01-18), which is only a c

Re: [PATCH] refs: parse_hide_refs_config to use parse_config_key

2017-02-24 Thread Jeff King
On Fri, Feb 24, 2017 at 12:43:35PM -0800, Stefan Beller wrote: > parse_config_key was introduced in 1b86bbb0ade (config: add helper > function for parsing key names, 2013-01-22), the NEEDSWORK that is removed > in this patch was introduced at daebaa7813 (upload/receive-pack: allow > hiding ref hie

Re: [PATCH] refs: parse_hide_refs_config to use parse_config_key

2017-02-24 Thread Jeff King
On Fri, Feb 24, 2017 at 12:33:35PM -0800, Stefan Beller wrote: > parse_config_key was introduced in 1b86bbb0ade (config: add helper > function for parsing key names, 2013-01-22), the NEEDSWORK that is removed > in this patch was introduced at daebaa7813 (upload/receive-pack: allow > hiding ref hie