[PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Tanay Abhra
Use `git_config_get_*()` family 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 --- fast-import.c | 42 +++--- 1 file changed, 19 insertions(+), 23

Re: [PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: fast-import.c | 42 +++--- 1 file changed, 19 insertions(+), 23 deletions(-) Only 4 lines less, how disappointing ;-). More seriously, the old code was essentially dealing with special values, which your new code

Re: [PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Tanay Abhra
if (pack_idx_opts.version 2) -die(bad pack.indexversion=%PRIu32, -pack_idx_opts.version); -return 0; +die(bad pack.indexversion=%PRIu32, pack_idx_opts.version); One more opportunity for

Re: [PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: Not that it's terribly important, but I think it's good that your refactoring also brings a few end-users benefits. It will help you show off when you tell your friends what you did this summer (not I did useless code churn ;-) ), and helps