git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add `log.decorate' configuration variable.

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Feb 17, 2010, 07:42 UTC
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 <gitster@pobox.com> wrote:
Show 30 quoted lines
> 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
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 9 in “Add `log.decorate' configuration variable.”
  1. Add `log.decorate' configuration variable.Steven Drake, Feb 16, 2010
  2. Junio C HamanoFeb 17, 2010
  3. Steven DrakeFeb 17, 2010
  4. Junio C HamanoFeb 17, 2010
  5. Steven DrakeFeb 17, 2010
  6. Junio C HamanoFeb 17, 2010
  7. Bert WesargFeb 17, 2010
  8. Re* [PATCH] Add `log.decorate' configuration variable.Junio C Hamano, Feb 17, 2010
  9. Heiko VoigtFeb 17, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.