From: Patrick Steinhardt Date: Fri, 06 Nov 2026 11:01:58 GMT Subject: Re: [PATCH 1/5] refs: create leading directories Message-ID: In-Reply-To: On Fri, Nov 06, 2026 at 02:37:23AM -0800, Karthik Nayak wrote: > Patrick Steinhardt 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