git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/5] refs: create leading directories

From
Patrick Steinhardt <ps@pks.im>
Date
Nov 6, 2026, 11:01 UTC
Message-ID
<au2zpr5qla3VG04h@pks.im>
In-Reply-To
<CAOLa=ZR3jxonz2o+JKe=pyzSACwJH=uu3an141PEG1Ssq0pBWg@mail.gmail.com>
On Fri, Nov 06, 2026 at 02:37:23AM -0800, Karthik Nayak wrote:
Show 64 quoted lines
> 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
Previous: Karthik NayakNext: Patrick Steinhardt
Message 4 of 13 in “Improvements for storage format handling”
  1. 0/5 Improvements for storage format handlingPatrick Steinhardt, Nov 5, 2026
  2. 1/5 refs: create leading directoriesPatrick Steinhardt, Nov 5, 2026
  3. Karthik NayakNov 6, 2026
  4. Patrick SteinhardtNov 6, 2026
  5. 2/5 odb/files: create leading directoriesPatrick Steinhardt, Nov 5, 2026
  6. 3/5 setup: allow speciyfing payloads with default storage formatsPatrick Steinhardt, Nov 5, 2026
  7. 4/5 builtin/rev-parse: print payload for the ref storage formatPatrick Steinhardt, Nov 5, 2026
  8. Karthik NayakNov 6, 2026
  9. 5/5 t: allow testing with a non-default object storage foramtPatrick Steinhardt, Nov 5, 2026
  10. Junio C HamanoNov 6, 2026
  11. Patrick SteinhardtNov 9, 2026
  12. Karthik NayakNov 6, 2026
  13. Patrick SteinhardtNov 6, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.