public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff King <peff@peff•net>
To: Junio C Hamano <gitster@pobox•com>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail•com>,
	git@vger•kernel.org, Patrick Steinhardt <ps@pks•im>,
	Johannes Schindelin <johannes.schindelin@gmx•de>,
	Taylor Blau <me@ttaylorr•com>
Subject: Re: [PATCH] perf: do allow `GIT_PERF_*` to be overridden again
Date: Tue, 22 Apr 2025 06:41:25 -0400	[thread overview]
Message-ID: <20250422104125.GA1460472@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqqfri28rlp.fsf@gitster.g>

On Sun, Apr 20, 2025 at 02:12:34PM -0700, Junio C Hamano wrote:

> > So I think we either need to rewrite the "run" script's fallback code,
> > or teach the GIT-BUILD-OPTIONS writer to avoid mentioning unset
> > variables (which is the real source of the problem in 4638e8806e3a).
> 
> ... this was raised.  And then I completely forgot about the topic,
> as nothing happened since then.
> 
> > ...yes, this is definitely the tip of the iceberg. I don't mind doing
> > this patch as an incremental step forward (and because it is an
> > improvement in behavior even if 4638e8806e3a were reverted). But the
> > issue is far from solved overall.
> 
> I do not mind it as an incremental band-aid.

Looks like this is in 'jch' now, but there's a mis-merge in e8cf2b99cd
(Merge branch 'ps/meson-build-perf-bench' into jch, 2025-04-21).

The original patch in this thread did something like:

  git_perf_settings=$(...pull GIT_PERF_* from env...)
   . ../test-lib.sh
  eval "$git_perf_settings"

That is, we stash away the environment, then load test-lib.sh, which
overwrites the environment, and then we restore (some of) the original
values.

In that merge, the test-lib.sh inclusion is moved (and in fact is now
accompanied by an explicit inclusion of GIT-BUILD-OPTIONS), and we now
have:

   . "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS
   . "$GIT_SOURCE_DIR"/t/test-lib.sh
   git_perf_settings=$(...)
   eval "$git_perf_settings"

Which of course does nothing. We need to set $git_perf_settings before
those other source lines (and the eval must remain after them).

-Peff

  reply	other threads:[~2025-04-22 10:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 10:56 [PATCH] perf: do allow `GIT_PERF_*` to be overridden again Johannes Schindelin via GitGitGadget
2025-04-04 12:13 ` Derrick Stolee
2025-04-19  3:54 ` Jeff King
2025-04-20 21:12   ` Junio C Hamano
2025-04-22 10:41     ` Jeff King [this message]
2025-04-22 15:37       ` 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=20250422104125.GA1460472@coredump.intra.peff.net \
    --to=peff@peff$(echo .)net \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitgitgadget@gmail$(echo .)com \
    --cc=gitster@pobox$(echo .)com \
    --cc=johannes.schindelin@gmx$(echo .)de \
    --cc=me@ttaylorr$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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