git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH 0/5] Update docs on GIT_* environment variables
Date: Thu, 15 Sep 2022 09:06:54 -0700	[thread overview]
Message-ID: <20220915160659.126441-1-gitster@pobox.com> (raw)
In-Reply-To: <xmqq8rmkpsit.fsf@gitster.g>

Historically the environment variables that affect the behaviour of
Git have been the least well designed part of the system, as they
were haphazardly added as the authors of new features find a need to
"tweak" and use of getenv() the simplest way to implement.

Although many use git_env_bool() to implement the parsing of a
Boolean value, some use handcrafted "ask atoi() to see if it yields
0", some use "mere existence is sufficient to signal true".

Here is a result of my quick audit of environment variables
mentioned in "git help git".

 * GIT_SSL_NO_VERIFY was mentioned in description of http.sslVerify
   but there was no description.

 * Many that used git_env_bool() explained acceptable "true"
   randomly as '1' or 'yes'.  Introduce and explain the concept of
   "Boolean environment variable" and mark them as such.

 * GIT_FLUSH is an oddball that used atoi() and not git_env_bool();
   leave a NEEDSWORK: comment to fix it later.

The last two are "I found them questionable while I was reviewing
the description" and are not about Boolean variables.

Junio C Hamano (5):
  environ: document GIT_SSL_NO_VERIFY
  environ: explain Boolean environment variables
  environ: GIT_FLUSH should be made a usual Boolean
  environ: simplify description of GIT_INDEX_FILE
  environ: GIT_INDEX_VERSION affects not just a new repository

 Documentation/git.txt | 43 +++++++++++++++++++++++++++----------------
 write-or-die.c        |  1 +
 2 files changed, 28 insertions(+), 16 deletions(-)

-- 
2.37.3-780-gd940517dcb


  reply	other threads:[~2022-09-15 16:09 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     ` Junio C Hamano [this message]
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
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=20220915160659.126441-1-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /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).