Re: [PATCH] config: add show_err flag to git_config_parse_key()

2015-02-11 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Wed, Feb 11, 2015 at 01:15:05AM +0530, Tanay Abhra wrote: I just saw your mail late in the night (I didn't had net for a week). This patch just squelches the error message, I will take a better look tomorrow morning. Thanks, this is probably a good first

[PATCH] config: add show_err flag to git_config_parse_key()

2015-02-10 Thread Tanay Abhra
`git_config_parse_key()` is used to sanitize the input key. Some callers of the function like `git_config_set_multivar_in_file()` get the per-sanitized key directly from the user so it becomes necessary to raise an error specifying what went wrong when the entered key is defective. Other callers

Re: [PATCH] config: add show_err flag to git_config_parse_key()

2015-02-10 Thread Jeff King
On Wed, Feb 11, 2015 at 01:15:05AM +0530, Tanay Abhra wrote: I just saw your mail late in the night (I didn't had net for a week). This patch just squelches the error message, I will take a better look tomorrow morning. Thanks, this is probably a good first step. We can worry about making the

[PATCH] config: add show_err flag to git_config_parse_key()

2014-10-30 Thread Tanay Abhra
`git_config_parse_key()` is used to sanitize the input key. Some callers of the function like `git_config_set_multivar_in_file()` get the pre-sanitized key directly from the user so it becomes necessary to raise an error specifying what went wrong when the entered key is defective. Other callers

Re: [PATCH] config: add show_err flag to git_config_parse_key()

2014-10-30 Thread Junio C Hamano
Tanay Abhra tanay...@gmail.com writes: `git_config_parse_key()` is used to sanitize the input key. Some callers of the function like `git_config_set_multivar_in_file()` get the pre-sanitized key directly from the user so it becomes necessary to raise an error specifying what went wrong when

Re: [PATCH] config: add show_err flag to git_config_parse_key()

2014-10-30 Thread Tanay Abhra
--- Hi, You were right, one of the functions was calling git_config_parse_key() which was leaking errors to the console. git_config_parse_key() was meant for sanitizing user provided keys only but it was being used internally in a place where only a return value would be enough. Thanks