]> Kevux Git Server - rit/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 6f444ea..5aa6dec 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 9be65fd..1219aa2 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 204ba67..60cb819 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 98d9713..48655bc 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 aa52de4..9696537 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 66a7ba8..ece9fae 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='apply empty'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 13c1da5..ddefc7f 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 84d0f40..dfa6b20 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 34f6c80..d74d7b2 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' '