Skip to content

Commit cebe702

Browse files
committed
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"
2 parents f949703 + 0eab85b commit cebe702

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

t/t5601-clone.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,18 @@ test_expect_success 'batch missing blob request does not inadvertently try to fe
776776
. "$TEST_DIRECTORY"/lib-httpd.sh
777777
start_httpd
778778

779+
test_expect_success 'clone with includeIf' '
780+
test_when_finished "rm -rf repo \"$HTTPD_DOCUMENT_ROOT_PATH/repo.git\"" &&
781+
git clone --bare --no-local src "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
782+
783+
test_when_finished "rm \"$HOME\"/.gitconfig" &&
784+
cat >"$HOME"/.gitconfig <<-EOF &&
785+
[includeIf "onbranch:something"]
786+
path = /does/not/exist.inc
787+
EOF
788+
git clone $HTTPD_URL/smart/repo.git repo
789+
'
790+
779791
test_expect_success 'partial clone using HTTP' '
780792
partial_clone "$HTTPD_DOCUMENT_ROOT_PATH/server" "$HTTPD_URL/smart/server"
781793
'

0 commit comments

Comments
 (0)