git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 5/8] t: honor default ref storage format

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 27, 2026, 08:18 UTC
Message-ID
<20261027-b4-pks-ci-test-vars-consolidation-v1-5-f28edf79bd6c@pks.im>
In-Reply-To
<20261027-b4-pks-ci-test-vars-consolidation-v1-0-f28edf79bd6c@pks.im>

When running with breaking changes enabled then we will also run tests with the SHA256 object hash by default, unless explicitly overridden. But we don't do the same for ref storage format and will continue to run tests with the "files" backend even though "reftables" are going to be the default backend there.

Adapt the logic to also use the compiled-in default ref storage backend for running our tests. Like this we'll now exercise the "reftable" backend when breaking changes are enabled.

This of course also applies to our CI jobs, where jobs exercising breaking changes will run now with both SHA256 and reftables. This renders the explicit "linux-reftable-sha256" job obsolete. Drop it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 .github/workflows/main.yml | 3 ---
 .gitlab-ci.yml             | 3 ---
 t/test-lib-functions.sh    | 2 +-
 t/test-lib.sh              | 4 +++-
 4 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index fe8155772ab..4353af2354e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -405,9 +405,6 @@ jobs:
         - jobname: linux-sha256
           image: ubuntu:rolling
           cc: clang
-        - jobname: linux-reftable-sha256
-          image: ubuntu:rolling
-          cc: clang
         - jobname: linux-feature-testbed
           image: ubuntu:latest
         - jobname: linux-breaking-changes
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9b7698a0037..52c26f72671 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -39,9 +39,6 @@ test:linux:
       - jobname: linux-sha256
         image: ubuntu:rolling
         CC: clang
-      - jobname: linux-reftable-sha256
-        image: ubuntu:rolling
-        CC: clang
       - jobname: linux-feature-testbed
         image: ubuntu:latest
       - jobname: linux-breaking-changes
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 09a41d51adc..6f319cd54ba 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -1737,7 +1737,7 @@ test_detect_hash () {
 
 # Detect the ref format in use.
 test_detect_ref_format () {
-	echo "${GIT_TEST_DEFAULT_REF_STORAGE_FORMAT:-files}"
+	echo "${GIT_TEST_DEFAULT_REF_STORAGE_FORMAT:-$GIT_TEST_BUILTIN_REF_STORAGE_FORMAT}"
 }
 
 # Load common hash metadata and common placeholder object IDs for use with
diff --git a/t/test-lib.sh b/t/test-lib.sh
index a893963f86c..de566309861 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -576,7 +576,9 @@ 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}"
+
+GIT_TEST_BUILTIN_REF_STORAGE_FORMAT=$("$GIT_BINARY" version --build-options | sed -ne 's/^default-ref-storage-format: //p')
+GIT_DEFAULT_REF_STORAGE_FORMAT="${GIT_TEST_DEFAULT_REF_STORAGE_FORMAT:-$GIT_TEST_BUILTIN_REF_STORAGE_FORMAT}"
 export GIT_DEFAULT_REF_STORAGE_FORMAT
 
 # Tests using GIT_TRACE typically don't want <timestamp> <file>:<line> output
-- 
2.56.0.341.g393f52fd96.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 6 of 32 in “ci: consolidate test variables”
  1. 0/8 ci: consolidate test variablesPatrick Steinhardt, Oct 27, 2026
  2. 1/8 ci: consolidate setup of test environmentPatrick Steinhardt, Oct 27, 2026
  3. 2/8 ci/lib: always set GIT_TEST_USE_SET_E on Linux jobsPatrick Steinhardt, Oct 27, 2026
  4. 3/8 ci/lib: deduplicate test variables by pattern matchingPatrick Steinhardt, Oct 27, 2026
  5. 4/8 ci/lib: merge switches for specific job namesPatrick Steinhardt, Oct 27, 2026
  6. 5/8 t: honor default ref storage formatPatrick Steinhardt, Oct 27, 2026
  7. 6/8 ci/lib: add another NO_RUST build using glibcPatrick Steinhardt, Oct 27, 2026
  8. 7/8 ci: don't override initial branch name in testbed jobPatrick Steinhardt, Oct 27, 2026
  9. 8/8 t/test-lib: make feature-testbed job more accessiblePatrick Steinhardt, Oct 27, 2026
  10. Phillip WoodOct 27, 2026
  11. Junio C HamanoOct 27, 2026
  12. Patrick SteinhardtOct 28, 2026
  13. Jeff KingOct 27, 2026
  14. Junio C HamanoOct 27, 2026
  15. Patrick SteinhardtOct 28, 2026
  16. Phillip WoodOct 28, 2026
  17. Patrick SteinhardtNov 2, 2026
  18. Phillip WoodOct 27, 2026
  19. Junio C HamanoOct 27, 2026
  20. Jeff KingOct 27, 2026
  21. Toon ClaesOct 28, 2026
  22. 0/7 ci: consolidate test variablesPatrick Steinhardt, Nov 2, 2026
  23. 1/7 ci: consolidate setup of test environmentPatrick Steinhardt, Nov 2, 2026
  24. 2/7 ci/lib: always set GIT_TEST_USE_SET_E on Linux jobsPatrick Steinhardt, Nov 2, 2026
  25. 3/7 ci/lib: deduplicate test variables by pattern matchingPatrick Steinhardt, Nov 2, 2026
  26. 4/7 ci/lib: merge switches for specific job namesPatrick Steinhardt, Nov 2, 2026
  27. 5/7 t: honor default ref storage formatPatrick Steinhardt, Nov 2, 2026
  28. 6/7 ci/lib: add another NO_RUST build using glibcPatrick Steinhardt, Nov 2, 2026
  29. 7/7 ci: don't override initial branch name in testbed jobPatrick Steinhardt, Nov 2, 2026
  30. Phillip WoodNov 2, 2026
  31. Jeff KingNov 4, 2026
  32. Junio C HamanoNov 4, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.