Since 793b14e1c8 (2025-07-04), git init creates reftable repositories when feature.experimental is enabled, so users can try the format planned as the Git 3.0 default. SHA-256 is also planned to become the default in 3.0, but feature.experimental did not affect the object format. Toon Claes's patch changes that. As with the ref format, the default can still be overridden, for example by init.defaultObjectFormat.
brian m. carlson called it a sensible patch and default. He had wondered whether the value could ever be GIT_HASH_UNKNOWN, and whether the change would work given a recent conversation with Junio. He said the tests Claes wrote answered that question.
Patrick Steinhardt said he had assumed feature.experimental already did this. He said that with Git 3.0 approaching, upcoming breaking changes should get more exposure. He confirmed that the function still lets init.defaultObjectFormat override the hash. He raised a sequencing concern: the patch should probably land after a separate patch from carlson (message ID 20261124225952.1616547-1-sandals@crustytoothpaste.net). Otherwise a repository could be reinitialized with the wrong hash when feature.experimental is set.
Steinhardt also suggested possible extra tests. One would check that --object-format=sha256 overrides feature.experimental. Another would check that cloning a SHA-1 repository still works with the setting on. He added that the existing suite would probably catch a problem there, and that further testing could become excessive.