From: Patrick Steinhardt Date: Thu, 05 Nov 2026 15:02:06 GMT Subject: [PATCH 5/5] t: allow testing with a non-default object storage foramt Message-ID: <20261105-pks-storage-format-improvements-v1-5-870bb4212518@pks.im> In-Reply-To: <20261105-pks-storage-format-improvements-v1-0-870bb4212518@pks.im> It is already possible to test Git with a non-default ref storage format by specifying `GIT_TEST_DEFAULT_REF_STORAGE_FORMAT`. We don't provide the same mechanism yet for testing the object storage format, and will instead use the default ("files"). Even worse though, we may inherit whatever the user has configured in `GIT_DEFAULT_OBJECT_STORAGE_FORMAT`. Introduce `GIT_TEST_DEFAULT_OBJECT_STORAGE_FORMAT` and have it default to the "files" backend. Note that this environment variable isn't all that useful, as we do not have an alternative backend. But what it does allow is to figure out which tests will definitely break once we do have an alternative backend because they assume that objects exist in ".git/objects", as we can now move objects into a different location by specifying a payload. Sure enough, running with "files://objdir" shows that around 1105 or our tests are failing. This is a surprisingly small number of failures, but we'll have to fix them if we ever want to introduce an alternative backend. Signed-off-by: Patrick Steinhardt --- t/test-lib.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/test-lib.sh b/t/test-lib.sh index a893963f86c..7fdd8272162 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -576,9 +576,13 @@ export EDITOR GIT_TEST_BUILTIN_HASH=$("$GIT_BINARY" version --build-options | sed -ne 's/^default-hash: //p') GIT_DEFAULT_HASH="${GIT_TEST_DEFAULT_HASH:-$GIT_TEST_BUILTIN_HASH}" export GIT_DEFAULT_HASH + GIT_DEFAULT_REF_STORAGE_FORMAT="${GIT_TEST_DEFAULT_REF_STORAGE_FORMAT:-files}" export GIT_DEFAULT_REF_STORAGE_FORMAT +GIT_DEFAULT_OBJECT_STORAGE_FORMAT="${GIT_TEST_DEFAULT_OBJECT_STORAGE_FORMAT:-files}" +export GIT_DEFAULT_OBJECT_STORAGE_FORMAT + # Tests using GIT_TRACE typically don't want : output GIT_TRACE_BARE=1 export GIT_TRACE_BARE -- 2.56.0.500.g5d06dc02cd.dirty