git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Steven Drake <sdrake@xnet.co.nz>, git@vger.kernel.org
Subject: Re: [PATCH] Add `log.decorate' configuration variable.
Date: Wed, 17 Feb 2010 08:42:08 +0100	[thread overview]
Message-ID: <36ca99e91002162342v2f151962p4d8f85f06c32205f@mail.gmail.com> (raw)
In-Reply-To: <7vljespt2l.fsf@alter.siamese.dyndns.org>

On Wed, Feb 17, 2010 at 02:08, Junio C Hamano <gitster@pobox.com> 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

  parent reply	other threads:[~2010-02-17  7:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 23:39 [PATCH] Add `log.decorate' configuration variable Steven Drake
2010-02-17  1:08 ` Junio C Hamano
2010-02-17  2:04   ` Steven Drake
2010-02-17  3:16     ` Junio C Hamano
2010-02-17  6:55       ` Steven Drake
2010-02-17  8:14         ` Junio C Hamano
2010-02-17  7:42   ` Bert Wesarg [this message]
2010-02-17  7:59     ` Re* " Junio C Hamano
2010-02-17 18:41 ` Heiko Voigt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36ca99e91002162342v2f151962p4d8f85f06c32205f@mail.gmail.com \
    --to=bert.wesarg@googlemail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sdrake@xnet.co.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).