mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
6361dea6e8
When cloning with bundle URIs we re-initialize `the_repository` after having fetched the bundle. This causes a bunch of memory leaks though because we do not release its previous state. These leaks can be plugged by calling `repo_clear()` before we call `repo_init()`. But this causes another issue because the remote that we used is tied to the lifetime of the repository's remote state, which would also get released. We thus have to make sure that it does not get free'd under our feet. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
19 lines
375 B
Bash
Executable File
19 lines
375 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description="Test bundle-uri with protocol v2 and 'file://' transport"
|
|
|
|
TEST_NO_CREATE_REPO=1
|
|
|
|
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
|
|
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
|
|
|
|
TEST_PASSES_SANITIZE_LEAK=true
|
|
. ./test-lib.sh
|
|
|
|
# Test protocol v2 with 'file://' transport
|
|
#
|
|
BUNDLE_URI_PROTOCOL=file
|
|
. "$TEST_DIRECTORY"/lib-bundle-uri-protocol.sh
|
|
|
|
test_done
|