Subject: Re: [PATCH v4 2/2] http-fetch: redact url on die() message

From: Junio C Hamano <[email-masked]>
Date: Fri, 29 Oct 2021 16:18:16 -0700

Ævar Arnfjörð Bjarmason <[email-masked]> 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.