git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 0/1] Safe-guard the Windows code a bit more against getenv() problems
Date: Fri, 15 Feb 2019 07:17:44 -0800 (PST)	[thread overview]
Message-ID: <pull.127.git.gitgitgadget@gmail.com> (raw)

We saw a couple of getenv() cleanups, where we now immediately duplicate the
return value of getenv() in order to avoid problems. However, I am really
uncomfortable with the current value (30) of GETENV_MAX_RETAIN in 
compat/mingw.c: it strikes me as low, given that the average number of 
getenv() call per Git process in Git's test suite is already 40.

I'd really like to increase it, even if it won't help problems where 
getenv() is called in a loop whose number of iteration depends on user input
(like the problem fixed in 6776a84dae (diff: ensure correct lifetime of
external_diff_cmd, 2019-01-11)). It will still fend off plenty of other
cases, I believe.

And yes, it's in my TODOs to look back over those getenv() issues after
v2.21.0 (see https://github.com/git-for-windows/git/pull/2019 for my
progress).

Johannes Schindelin (1):
  mingw: safe-guard a bit more against getenv() problems

 compat/mingw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 2d08f3deb9feb73dc8d21d75bfd367839fc1322c
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-127%2Fdscho%2Fmingw-retain-more-getenv-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-127/dscho/mingw-retain-more-getenv-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/127
-- 
gitgitgadget

             reply	other threads:[~2019-02-15 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15 15:17 Johannes Schindelin via GitGitGadget [this message]
2019-02-15 15:17 ` [PATCH 1/1] mingw: safe-guard a bit more against getenv() problems Johannes Schindelin via GitGitGadget
2019-02-15 16:14   ` Jeff Hostetler
2019-02-15 18:25     ` Junio C Hamano
2019-02-18 18:57     ` Johannes Schindelin
2019-02-21 13:58       ` Jeff King
2019-02-21 13:52   ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=pull.127.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).