Skip to content

Commit

Permalink
Merge branch 'ps/clone-with-includeif-onbranch'
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
gitster committed Apr 1, 2024
2 parents f949703 + 0eab85b commit cebe702
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/t5601-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
'
Expand Down

0 comments on commit cebe702

Please sign in to comment.