diff options
author | Kyle Lippincott <spectral@google.com> | 2025-07-15 18:57:54 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-07-15 14:31:09 -0700 |
commit | d79f8c6865862c9a48c095493735923800bcf34b (patch) | |
tree | fee45b5332d249aad4219a806a67b431c678770c /commit.c | |
parent | a6b007093a704324161fbf37c0c5bded1203d84a (diff) |
test-lib: respect GIT_TEST_INSTALLED when querying default hash
$GIT_TEST_INSTALLED can be set to use an "installed" git instead of the
one from $GIT_BUILD_DIR. This is used by my company's internal test
infrastructure, and not using $GIT_TEST_INSTALLED when querying the
default hash meant that the tests were failing because the hash was
effectively set to the empty string (since git didn't execute).
In the two places we attempt to detect/execute git itself prior to
overriding everything and putting it in $PATH, use identical logic for
identifying the git binary to execute. This also has the effect of
including the $X suffix when querying the default hash, but that's not
strictly necessary. You don't need to specify .exe when running a binary
on Windows, just when testing whether it exists or not.
Signed-off-by: Kyle Lippincott <spectral@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions