From: Bert Wesarg Date: Wed, 17 Feb 2010 07:42:08 GMT Subject: Re: [PATCH] Add `log.decorate' configuration variable. Message-ID: <36ca99e91002162342v2f151962p4d8f85f06c32205f@mail.gmail.com> In-Reply-To: <7vljespt2l.fsf@alter.siamese.dyndns.org> On Wed, Feb 17, 2010 at 02:08, Junio C Hamano wrote: > diff --git a/config.c b/config.c > index 6963fbe..6642d30 100644 > --- a/config.c > +++ b/config.c > @@ -322,9 +322,8 @@ unsigned long git_config_ulong(const char *name, const char *value) >        return ret; >  } > > -int git_config_bool_or_int(const char *name, const char *value, int *is_bool) > +int git_config_maybe_bool(const char *name, const char *value) >  { > -       *is_bool = 1; >        if (!value) >                return 1; >        if (!*value) > @@ -333,7 +332,14 @@ int git_config_bool_or_int(const char *name, const char *value, int *is_bool) >                return 1; >        if (!strcasecmp(value, "false") || !strcasecmp(value, "no") || !strcasecmp(value, "off")) >                return 0; > -       *is_bool = 0; > +       return -1; > +} > + > +int git_config_bool_or_int(const char *name, const char *value, int *is_bool) > +{ > +       int v = git_config_maybe_bool(name, value); > +       if (0 <= v) > +               return v; >        return git_config_int(name, value); >  } What happened with the is_bool parameter? Bert