]> git.ipfire.org Git - thirdparty/git.git/commitdiff
revisions API: clear "boundary_commits" in release_revisions()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 13 Apr 2022 20:01:51 +0000 (22:01 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Apr 2022 06:56:09 +0000 (23:56 -0700)
Clear the "boundary_commits" object_array in release_revisions(). This
makes a few more tests pass under SANITIZE=leak, including
"t/t4126-apply-empty.sh" which started failed as an UNLEAK() in
cmd_format_patch() was removed in a preceding commit.

This also re-marks the various tests relying on "git format-patch" as
passing under "SANITIZE=leak", in the preceding "revisions API users:
use release_revisions() in builtin/log.c" commit those were marked as
failing as we removed the UNLEAK(rev) from cmd_format_patch() in
"builtin/log.c".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
revision.c
t/t4021-format-patch-numbered.sh
t/t4028-format-patch-mime-headers.sh
t/t4036-format-patch-signer-mime.sh
t/t4122-apply-symlink-inside.sh
t/t4126-apply-empty.sh
t/t6110-rev-list-sparse.sh
t/t9001-send-email.sh
t/t9116-git-svn-log.sh

index 6f444eaaeba8a15f15a29e1b121c7fff0fc13882..5aa6dec4532360498424325dbcb4ae58a63bce37 100644 (file)
@@ -2947,6 +2947,7 @@ void release_revisions(struct rev_info *revs)
 {
        free_commit_list(revs->commits);
        object_array_clear(&revs->pending);
+       object_array_clear(&revs->boundary_commits);
        release_revisions_cmdline(&revs->cmdline);
        list_objects_filter_release(&revs->filter);
        clear_pathspec(&revs->prune_data);
index 9be65fd4440a68af70e6630c8ded872d7be41f5d..1219aa226dc7259172dba38da3f7354870e0929b 100755 (executable)
@@ -5,6 +5,7 @@
 
 test_description='Format-patch numbering options'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 204ba673cb58f905f2f35ff5b83294b2a2943f48..60cb819c42e4bc3b5fcc2a771b1b4bb876674cff 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='format-patch mime headers and extra headers do not conflict'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create commit with utf-8 body' '
index 98d9713d8b2454eb1dfc4f137133a7cb0174bd0d..48655bcc789eef6f08896b064440ea25a36c6e47 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='format-patch -s should force MIME encoding as needed'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index aa52de401b96ec1e6c7f2c2c6ec87ef4d0d393e7..96965373036a6944971b28cbf5c9f42e2c9abdb2 100755 (executable)
@@ -4,6 +4,7 @@ test_description='apply to deeper directory without getting fooled with symlink'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 66a7ba8ab8f29044fa11188ec182e45fa6907960..ece9fae207dbdbcc28a4ac999a351bd059c0968a 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='apply empty'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 13c1da5352836758cb0806d0f969f2aac4c8f7c9..ddefc7f24ee9cacc6cb7f5ca84c8ca3010e60ca5 100755 (executable)
@@ -4,6 +4,7 @@ test_description='operations that cull histories in unusual ways'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 84d0f40d76a979b1e98ca911979fd00d64c3f80e..dfa6b20f7a6b7f06798063ee2511fb88ac093690 100755 (executable)
@@ -4,6 +4,7 @@ test_description='git send-email'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # May be altered later in the test
index 34f6c80dea3d3c508ca549d6a576e9cc634e0884..d74d7b2de68e05cb41d0740f54fa598aaa50fa9a 100755 (executable)
@@ -5,7 +5,6 @@
 
 test_description='git svn log tests'
 
-TEST_FAILS_SANITIZE_LEAK=true
 . ./lib-git-svn.sh
 
 test_expect_success 'setup repository and import' '