All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/5] environ: GIT_FLUSH should be made a usual Boolean
Date: Wed, 04 Jan 2023 15:37:54 +0900	[thread overview]
Message-ID: <xmqqwn62u7nh.fsf@gitster.g> (raw)
In-Reply-To: <c58476c9-f7d1-bea4-17eb-c5346790df2e@web.de> ("René Scharfe"'s message of "Tue, 3 Jan 2023 18:18:32 +0100")

René Scharfe <l.s.r@web.de> writes:

> Subject: [PATCH] environ: use git_parse_maybe_bool() for GIT_FLUSH
>
> Accept textual boolean values like "true" and "false" for GIT_FLUSH by
> using git_parse_maybe_bool() to parse the variable's value.  Here's
> how this changes whether to flush:
>
>                        before                  with this patch
> ---------------------- ----------------------- -----------------------
> (unset)                if stdin is not a file  if stdin is not a file
> GIT_FLUSH=             no                      no
> GIT_FLUSH=0            no                      no
> GIT_FLUSH=1	       yes                     yes
> GIT_FLUSH=false        no                      no
> GIT_FLUSH=true         no                      yes
> GIT_FLUSH=bogus        no                      if stdin is not a file

The above looks easy to grok, but the following caught my eyes.

> GIT_FLUSH=10000000000  yes                     if stdin is not a file

Is this because the int is so large that git_parse_signed() notices
that it is out of bound (hence "bogus")?

> Requested-by: Junio C Hamano <gitster@pobox.com>
> Signed-off-by: René Scharfe <l.s.r@web.de>
> ---
>  Documentation/git.txt | 10 ++++------
>  write-or-die.c        | 18 +++++++++---------
>  2 files changed, 13 insertions(+), 15 deletions(-)

I may have suggested it, but don't think I requested ;-)

The patch text looks good.  Thanks.

  reply	other threads:[~2023-01-04  6:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  1:46 BUG: Value for GIT_SSL_NO_VERIFY has no effect Brijesh Patel
2022-09-15 13:04 ` brian m. carlson
2022-09-15 15:27   ` Junio C Hamano
2022-09-15 16:06     ` [PATCH 0/5] Update docs on GIT_* environment variables Junio C Hamano
2022-09-15 16:06       ` [PATCH 1/5] environ: document GIT_SSL_NO_VERIFY Junio C Hamano
2022-09-15 16:06       ` [PATCH 2/5] environ: explain Boolean environment variables Junio C Hamano
2022-09-15 16:06       ` [PATCH 3/5] environ: GIT_FLUSH should be made a usual Boolean Junio C Hamano
2023-01-03 17:18         ` René Scharfe
2023-01-04  6:37           ` Junio C Hamano [this message]
2023-01-04 16:36             ` René Scharfe
2023-01-04  7:33           ` Jeff King
2023-01-04 16:36             ` René Scharfe
2023-01-06  9:10               ` Jeff King
2022-09-15 16:06       ` [PATCH 4/5] environ: simplify description of GIT_INDEX_FILE Junio C Hamano
2022-09-16 15:39         ` Todd Zullinger
2022-09-16 16:44           ` Junio C Hamano
2022-09-15 16:06       ` [PATCH 5/5] environ: GIT_INDEX_VERSION affects not just a new repository Junio C Hamano
2022-09-15 16:15     ` BUG: Value for GIT_SSL_NO_VERIFY has no effect brian m. carlson
2022-09-15 18:05       ` Junio C Hamano

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=xmqqwn62u7nh.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.