From: Matthieu Moy Date: Wed, 13 Aug 2014 11:32:37 GMT Subject: Re: [PATCH 2/4] ll-merge.c: refactor `read_merge_config()` to use `git_config_string()` Message-ID: In-Reply-To: <1407918122-29973-2-git-send-email-tanayabh@gmail.com> Tanay Abhra writes: > Signed-off-by: Tanay Abhra > --- > ll-merge.c | 23 ++++++----------------- > 1 file changed, 6 insertions(+), 17 deletions(-) > > diff --git a/ll-merge.c b/ll-merge.c > index fb61ea6..8ea03e5 100644 > --- a/ll-merge.c > +++ b/ll-merge.c > @@ -225,11 +225,8 @@ static int read_merge_config(const char *var, const char *value, void *cb) > const char *key, *name; > int namelen; > > - if (!strcmp(var, "merge.default")) { > - if (value) > - default_ll_merge = xstrdup(value); > - return 0; > - } > + if (!strcmp(var, "merge.default")) > + return git_config_string(&default_ll_merge, var, value); Previously, merge.default without value was a no-op. It's now an error. I think it makes perfect sense, but should be documented in the log message. Also, I think you should explain briefly the reason for not using your non-callback API here. -- Matthieu Moy http://www-verimag.imag.fr/~moy/