aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-read-cache.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-11-05 07:17:40 +0100
committerJunio C Hamano <gitster@pobox.com>2024-11-04 22:37:56 -0800
commita53144cf1bfc5ef5b4d8b58311ea83e32e00a69f (patch)
tree533d6214e3c1711974d7a3480cbdd5d9105be037 /t/helper/test-read-cache.c
parent1f5ff83eab03773692fe6f7bab7f10ad82ab031b (diff)
downloadgit-a53144cf1bfc5ef5b4d8b58311ea83e32e00a69f.tar.gz
t/helper: stop re-initialization of `the_repository`
While "common-main.c" already initializes `the_repository` for us, we do so a second time in the "read-cache" test helper. This causes a memory leak because the old repository's contents isn't released. Stop calling `initialize_repository()` to plug this leak. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-read-cache.c')
-rw-r--r--t/helper/test-read-cache.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/t/helper/test-read-cache.c b/t/helper/test-read-cache.c
index d285c656bd..e277dde8e7 100644
--- a/t/helper/test-read-cache.c
+++ b/t/helper/test-read-cache.c
@@ -11,8 +11,6 @@ int cmd__read_cache(int argc, const char **argv)
int i, cnt = 1;
const char *name = NULL;
- initialize_repository(the_repository);
-
if (argc > 1 && skip_prefix(argv[1], "--print-and-refresh=", &name)) {
argc--;
argv++;