Re: [PATCH 1/5] refs: create leading directories
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Nov 6, 2026, 10:37 UTC
- Message-ID
- <CAOLa=ZR3jxonz2o+JKe=pyzSACwJH=uu3an141PEG1Ssq0pBWg@mail.gmail.com>
- In-Reply-To
- <20261105-pks-storage-format-improvements-v1-1-870bb4212518@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
The patch looks good.
Show 10 quoted lines
> 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.
Show 22 quoted lines
> + 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.
Show 6 quoted lines
> test_expect_success 'cloning repository with alt ref directory' ' > test_when_finished "rm -rf source repo refdir" && > mkdir refdir && > > -- > 2.56.0.500.g5d06dc02cd.dirty