From: Patrick Steinhardt <ps@pks.im>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/5] refs: create leading directories
Date: Fri, 6 Nov 2026 12:01:58 +0100 [thread overview]
Message-ID: <au2zpr5qla3VG04h@pks.im> (raw)
In-Reply-To: <CAOLa=ZR3jxonz2o+JKe=pyzSACwJH=uu3an141PEG1Ssq0pBWg@mail.gmail.com>
On Fri, Nov 06, 2026 at 02:37:23AM -0800, Karthik Nayak wrote:
> Patrick Steinhardt <ps@pks.im> writes:
> > diff --git a/t/t1423-ref-backend.sh b/t/t1423-ref-backend.sh
> > index ee2bb66b99c..85d1e876b82 100755
> > --- a/t/t1423-ref-backend.sh
> > +++ b/t/t1423-ref-backend.sh
> > @@ -284,6 +284,30 @@ test_expect_success 'initializing repository with --ref-storage-format and paylo
> > test_cmp expect actual
> > '
> >
> > +for format in files reftable
> > +do
>
> This would run the loop for both the files and reftable CI jobs.
>
> > + test_expect_success "default ref storage format with $format backend and payload" '
> > + test_when_finished "rm -rf repo refdir" &&
> > + BACKEND="$format://$(pwd)/refdir" &&
> > + echo "$BACKEND" >expect &&
> > + git init --ref-storage-format="$BACKEND" repo &&
> > + test_path_is_dir refdir &&
> > + case "$format" in
> > + files)
> > + test_path_is_file refdir/HEAD &&
> > + test_path_is_dir refdir/refs
> > + ;;
> > + reftable)
> > + test_path_is_dir refdir/reftable &&
> > + test_path_is_file refdir/reftable/tables.list
> > + ;;
> > + *)
> > + BUG "unknown ref storage format: $format"
> > + ;;
> > + esac
> > + '
> > +done
> > +
>
> Should we instead do (untested):
>
> test_expect_success "default ref storage format with $format backend
> and payload" '
> test_when_finished "rm -rf repo refdir" &&
> format="$(test_detect_ref_format)" &&
> BACKEND="$format://$(pwd)/refdir" &&
> echo "$BACKEND" >expect &&
> git init --ref-storage-format="$BACKEND" repo &&
> test_path_is_dir refdir &&
> case "$format" in
> files)
> test_path_is_file refdir/HEAD &&
> test_path_is_dir refdir/refs
> ;;
> reftable)
> test_path_is_dir refdir/reftable &&
> test_path_is_file refdir/reftable/tables.list
> ;;
> *)
> BUG "unknown ref storage format: $format"
> ;;
> esac
> '
>
> This eliminates the loop, while still testing both backends on their
> respective CI jobs.
Well, in this case the system under test is explicitly the ref storage
format itself and how it behaves together with the extension. The
GIT_TEST_DEFAULT_REF_STORAGE format on the other hand is design to
explicitly test that everything else works as-is with an alternate ref
store.
So I think it makes sense to keep this explicit test.
Patrick
next prev parent reply other threads:[~2026-11-06 11:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 15:02 [PATCH 0/5] Improvements for storage format handling Patrick Steinhardt
2026-11-05 15:02 ` [PATCH 1/5] refs: create leading directories Patrick Steinhardt
2026-11-06 10:37 ` Karthik Nayak
2026-11-06 11:01 ` Patrick Steinhardt [this message]
2026-11-05 15:02 ` [PATCH 2/5] odb/files: " Patrick Steinhardt
2026-11-05 15:02 ` [PATCH 3/5] setup: allow speciyfing payloads with default storage formats Patrick Steinhardt
2026-11-05 15:02 ` [PATCH 4/5] builtin/rev-parse: print payload for the ref storage format Patrick Steinhardt
2026-11-06 10:40 ` Karthik Nayak
2026-11-05 15:02 ` [PATCH 5/5] t: allow testing with a non-default object storage foramt Patrick Steinhardt
2026-11-06 18:59 ` Junio C Hamano
2026-11-06 10:41 ` [PATCH 0/5] Improvements for storage format handling Karthik Nayak
2026-11-06 11:02 ` 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=au2zpr5qla3VG04h@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox