From: Junio C Hamano Date: Fri, 29 Oct 2021 23:18:16 GMT Subject: Re: [PATCH v4 2/2] http-fetch: redact url on die() message Message-ID: In-Reply-To: <211028.86sfwlw10o.gmgdl@evledraar.gmail.com> Ævar Arnfjörð Bjarmason writes: >> + if (!git_env_bool("GIT_TRACE_REDACT", 1) || !nurl) { >> + die("Unable to get pack file %s\n%s", preq->url, >> + curl_errorstr); > > small nit: arrange if's from "if (cheap || expensive)", i.e. no need for > getenv() if !nurl, but maybe compilers are smart enough for that... They typically do not see what happens inside git_env_bool() while compling this compilation unit, and cannot tell if the programmer wanted to call it first for its side effects, hence they cannot swap them safely.