Skip to content

Commit 79c64eb

Browse files
committed
Merge branch 'kl/test-installed-fix'
GIT_TEST_INSTALLED was not honored in the recent topic related to SHA256 hashes, which has been corrected. * kl/test-installed-fix: test-lib: respect GIT_TEST_INSTALLED when querying default hash
2 parents 5ce9702 + d79f8c6 commit 79c64eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

t/test-lib.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
134134

135135
################################################################
136136
# It appears that people try to run tests without building...
137-
"${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X" >/dev/null
137+
GIT_BINARY="${GIT_TEST_INSTALLED:-$GIT_BUILD_DIR}/git$X"
138+
"$GIT_BINARY" >/dev/null
138139
if test $? != 1
139140
then
140141
if test -n "$GIT_TEST_INSTALLED"
@@ -536,7 +537,7 @@ export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
536537
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
537538
export EDITOR
538539

539-
GIT_TEST_BUILTIN_HASH=$("$GIT_BUILD_DIR/git" version --build-options | sed -ne 's/^default-hash: //p')
540+
GIT_TEST_BUILTIN_HASH=$("$GIT_BINARY" version --build-options | sed -ne 's/^default-hash: //p')
540541
GIT_DEFAULT_HASH="${GIT_TEST_DEFAULT_HASH:-$GIT_TEST_BUILTIN_HASH}"
541542
export GIT_DEFAULT_HASH
542543
GIT_DEFAULT_REF_FORMAT="${GIT_TEST_DEFAULT_REF_FORMAT:-files}"

0 commit comments

Comments
 (0)