diff mbox series

[v1,3/3] t5702: `fetch.uriprotocols` is configured without value

Message ID 3ee54255440fcc5cf549ab5e98fa51bbcd5df2e1.1628845748.git.dyroneteng@gmail.com (mailing list archive)
State New, archived
Headers show
Series packfile-uri: http and https as default value of `--uri-protocol` | expand

Commit Message

Teng Long Aug. 13, 2021, 9:14 a.m. UTC
Signed-off-by: Teng Long <dyroneteng@gmail.com>
---
 t/t5702-protocol-v2.sh | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
diff mbox series

Patch

diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh
index 66af411057..cf3bc89775 100755
--- a/t/t5702-protocol-v2.sh
+++ b/t/t5702-protocol-v2.sh
@@ -945,6 +945,29 @@  test_expect_success 'packfile URIs with fetch instead of clone' '
 		fetch "$HTTPD_URL/smart/http_parent"
 '
 
+test_expect_success 'packfile URIs with fetch by default `fetch.uriprotocols` config' '
+	P="$HTTPD_DOCUMENT_ROOT_PATH/http_parent" &&
+	rm -rf "$P" http_child log &&
+
+	git init "$P" &&
+	git -C "$P" config "uploadpack.allowsidebandall" "true" &&
+
+	echo my-blob >"$P/my-blob" &&
+	git -C "$P" add my-blob &&
+	git -C "$P" commit -m x &&
+
+	configure_exclusion "$P" my-blob >h &&
+
+	git init http_child &&
+
+	GIT_TEST_SIDEBAND_ALL=1 GIT_TRACE_PACKET=`pwd`/log \
+	git -C http_child \
+		-c protocol.version=2 \
+		-c fetch.uriprotocols \
+		fetch "$HTTPD_URL/smart/http_parent" &&
+	grep "git< packfile-uris http,https" log
+'
+
 test_expect_success 'fetching with valid packfile URI but invalid hash fails' '
 	P="$HTTPD_DOCUMENT_ROOT_PATH/http_parent" &&
 	rm -rf "$P" http_child log &&