From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/7] setup: allow overriding object storage format via environment
Date: Tue, 20 Oct 2026 10:50:44 +0200 [thread overview]
Message-ID: <atcrZHZkvitoFJMR@pks.im> (raw)
In-Reply-To: <CAOLa=ZTbYQvnKBodYm4Bmk7Veb=tt6oDJwWqb+AfXdiuLxcdrA@mail.gmail.com>
On Mon, Oct 19, 2026 at 05:34:39PM -0400, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> 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?
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
next prev parent reply other threads:[~2026-10-20 8:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 8:55 [PATCH 0/7] odb: introduce object storage extension Patrick Steinhardt
2026-10-19 8:55 ` [PATCH 1/7] loose: drop unused `repo_write_loose_object_map()` Patrick Steinhardt
2026-10-19 20:21 ` Karthik Nayak
2026-10-20 8:49 ` Patrick Steinhardt
2026-10-19 8:55 ` [PATCH 2/7] setup: introduce object storage extension Patrick Steinhardt
2026-10-19 21:29 ` Karthik Nayak
2026-10-20 1:27 ` Junio C Hamano
2026-10-20 8:50 ` Patrick Steinhardt
2026-10-19 8:55 ` [PATCH 3/7] setup: allow overriding object storage format via environment Patrick Steinhardt
2026-10-19 21:34 ` Karthik Nayak
2026-10-20 8:50 ` Patrick Steinhardt [this message]
2026-10-19 8:55 ` [PATCH 4/7] builtin: expose the object storage format Patrick Steinhardt
2026-10-19 21:40 ` Karthik Nayak
2026-10-20 8:50 ` Patrick Steinhardt
2026-10-19 8:56 ` [PATCH 5/7] builtin/init: introduce handling of " Patrick Steinhardt
2026-10-19 8:56 ` [PATCH 6/7] builtin/clone: introduce "--object-storage-format=" Patrick Steinhardt
2026-10-19 8:56 ` [PATCH 7/7] builtin/submodule: propagate "--object-storage-format=" Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atcrZHZkvitoFJMR@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=karthik.188@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.