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

[PATCH 0/5] Update docs on GIT_* environment variables

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2022, 16:06 UTC
Message-ID
<20220915160659.126441-1-gitster@pobox.com>
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
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 19 in “BUG: Value for GIT_SSL_NO_VERIFY has no effect”
  1. Brijesh PatelSep 15, 2022
  2. brian m. carlsonSep 15, 2022
  3. Junio C HamanoSep 15, 2022
  4. 0/5 Update docs on GIT_* environment variablesJunio C Hamano, Sep 15, 2022
  5. 2/5 environ: explain Boolean environment variablesJunio C Hamano, Sep 15, 2022
  6. 5/5 environ: GIT_INDEX_VERSION affects not just a new repositoryJunio C Hamano, Sep 15, 2022
  7. 1/5 environ: document GIT_SSL_NO_VERIFYJunio C Hamano, Sep 15, 2022
  8. 3/5 environ: GIT_FLUSH should be made a usual BooleanJunio C Hamano, Sep 15, 2022
  9. René ScharfeJan 3, 2023
  10. Junio C HamanoJan 4, 2023
  11. René ScharfeJan 4, 2023
  12. Jeff KingJan 4, 2023
  13. René ScharfeJan 4, 2023
  14. Jeff KingJan 6, 2023
  15. 4/5 environ: simplify description of GIT_INDEX_FILEJunio C Hamano, Sep 15, 2022
  16. Todd ZullingerSep 16, 2022
  17. Junio C HamanoSep 16, 2022
  18. brian m. carlsonSep 15, 2022
  19. Junio C HamanoSep 15, 2022

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.