[PATCH v3 2/6] branch.c: replace `git_config()` with `git_config_get_string()`

2014-07-21 Thread Tanay Abhra
Use `git_config_get_string()` instead of `git_config()` to take advantage of the config-set API which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- branch.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/branch.c

Re: [PATCH v3 2/6] branch.c: replace `git_config()` with `git_config_get_string()`

2014-07-21 Thread Junio C Hamano
Tanay Abhra tanay...@gmail.com writes: Use `git_config_get_string()` instead of `git_config()` to take advantage of the config-set API which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- branch.c | 24 1 file changed, 4

Re: [PATCH v3 2/6] branch.c: replace `git_config()` with `git_config_get_string()`

2014-07-21 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes: Tanay Abhra tanay...@gmail.com writes: -if (cb.value) -strbuf_addstr(buf, cb.value); +strbuf_addstr(buf, v); +free((char*)v); In this cast, I smell an API mistake to insist an extra constness to the output parameter of

Re: [PATCH v3 2/6] branch.c: replace `git_config()` with `git_config_get_string()`

2014-07-21 Thread Tanay Abhra
On 7/21/2014 11:29 PM, Junio C Hamano wrote: Tanay Abhra tanay...@gmail.com writes: Use `git_config_get_string()` instead of `git_config()` to take advantage of the config-set API which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- branch.c | 24