aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-04-01 13:21:35 -0700
committerJunio C Hamano <gitster@pobox.com>2024-04-01 13:21:36 -0700
commitcebe702a2a100cc44e0eb581089915e7cea134f5 (patch)
tree2a63ce6767e345912950d29b79afbab420bbcab6
parentf949703f4b0a89704f45ccd8552334d1627949b9 (diff)
parent0eab85b90f55e4bf9dfb97abd8e7d9b0cdac73b9 (diff)
downloadgit-cebe702a2a100cc44e0eb581089915e7cea134f5.tar.gz
Merge branch 'ps/clone-with-includeif-onbranch'
An additional test to demonstrate that clone would not choke on a global configuration file that uses includeIf.onbranch:*.path. * ps/clone-with-includeif-onbranch: t5601: exercise clones with "includeIf.*.onbranch"
-rwxr-xr-xt/t5601-clone.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index fb1b9c686d..ca43185681 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -776,6 +776,18 @@ test_expect_success 'batch missing blob request does not inadvertently try to fe
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
+test_expect_success 'clone with includeIf' '
+ test_when_finished "rm -rf repo \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\"" &&
+ git clone --bare --no-local src "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
+
+ test_when_finished "rm \"$HOME\"/.gitconfig" &&
+ cat >"$HOME"/.gitconfig <<-EOF &&
+ [includeIf "onbranch:something"]
+ path = /does/not/exist.inc
+ EOF
+ git clone $HTTPD_URL/smart/repo.git repo
+'
+
test_expect_success 'partial clone using HTTP' '
partial_clone "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server"
'