From: Karthik Nayak Date: Tue, 20 Oct 2026 19:08:36 GMT Subject: Re: [PATCH 3/7] setup: allow overriding object storage format via environment Message-ID: In-Reply-To: Patrick Steinhardt writes: > On Mon, Oct 19, 2026 at 05:34:39PM -0400, Karthik Nayak wrote: >> Patrick Steinhardt writes: >> > diff --git a/t/t0001-init.sh b/t/t0001-init.sh >> > index c7c464d3a2..5e7c25e42c 100755 >> > --- a/t/t0001-init.sh >> > +++ b/t/t0001-init.sh >> > @@ -869,6 +869,32 @@ test_expect_success DEFAULT_REPO_FORMAT 'extensions.objectStorage with unknown b >> > test_grep "invalid value for ${SQ}extensions.objectstorage${SQ}: ${SQ}garbage://payload${SQ}" err >> > ' >> > >> > +test_expect_success DEFAULT_REPO_FORMAT 'GIT_OBJECT_STORAGE_FORMAT overrides extensions.objectStorage' ' >> > + test_when_finished "rm -rf objstorage" && >> > + git init objstorage && >> > + ( >> > + cd objstorage && >> > + git config set core.repositoryformatversion 1 && >> > + git config set extensions.objectStorage files://objs && >> >> This commit does test the payload for the files backend. I do wonder if >> we can make a matrix for tests >> >> {config, env} x >> {valid backend, invalid backend} x >> {valid relative path, valid absolute path, invalid path} > > There's more to this test matrix: GIT_DEFAULT_OBJECT_STORAGE_FORMAT, > "init.defaultObjectStorageFormat", "git init --object-storage-format=". > So that would result in a matrix that covers 30 different combinations, > which I feel might be a bit excessive. > > That being said I do add lots of tests especially in the patch that > extends git-init(1), even though they're not layed out in a matrix. I'd > propose that we go from there and extend these tests in case there's > anything missing there? > That's okay, I only was curious if we'd miss anything. The matrix is easier to think about. > I think the one thing that's missing is exercising invalid paths. The > question though is what an invalid path even is. Right now for example > we use `safe_create_dir()`, so we won't create leading directories. I'm > not sure whether that restriction is a sensible one, and because of this > I shy away from seemingly casting it into stone via a test. But if we > eventually start to create leading directories, then there isn't really > any path that I would consider invalid, right? > > Patrick Yeah that's fair. It's all good then.