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

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
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 3 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.