From: Junio C Hamano <gitster@pobox.com>
To: "Kyle Lippincott via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Kyle Lippincott <spectral@google.com>
Subject: Re: [PATCH] test-lib: respect GIT_TEST_INSTALLED when querying default hash
Date: Tue, 15 Jul 2025 14:27:47 -0700 [thread overview]
Message-ID: <xmqqv7ntf8ks.fsf@gitster.g> (raw)
In-Reply-To: <pull.2011.git.git.1752605874596.gitgitgadget@gmail.com> (Kyle Lippincott via GitGitGadget's message of "Tue, 15 Jul 2025 18:57:54 +0000")
"Kyle Lippincott via GitGitGadget" <gitgitgadget@gmail.com> writes:
> ################################################################
> # It appears that people try to run tests without building...
> -"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X" >/dev/null
> +GIT_BINARY="${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X"
> +"$GIT_BINARY" >/dev/null
> if test $? != 1
> then
> if test -n "$GIT_TEST_INSTALLED"
> @@ -536,7 +537,7 @@ export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
> export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
> export EDITOR
>
> -GIT_TEST_BUILTIN_HASH=$("$GIT_BUILD_DIR/git" version --build-options | sed -ne 's/^default-hash: //p')
> +GIT_TEST_BUILTIN_HASH=$("$GIT_BINARY" version --build-options | sed -ne 's/^default-hash: //p')
Very nice. I very much like the way this reuses what we detected earlier.
Thanks, will queue.
> GIT_DEFAULT_HASH="${GIT_TEST_DEFAULT_HASH:-$GIT_TEST_BUILTIN_HASH}"
> export GIT_DEFAULT_HASH
> GIT_DEFAULT_REF_FORMAT="${GIT_TEST_DEFAULT_REF_FORMAT:-files}"
>
> base-commit: e9779f64349fbcc8d177d055208039877316e652
next prev parent reply other threads:[~2025-07-15 21:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 18:57 [PATCH] test-lib: respect GIT_TEST_INSTALLED when querying default hash Kyle Lippincott via GitGitGadget
2025-07-15 21:27 ` Junio C Hamano [this message]
2025-07-15 21:33 ` Justin Tobler
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=xmqqv7ntf8ks.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=spectral@google.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox