diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-04-13 20:01:42 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-14 06:56:09 (GMT) |
commit | f6bfea0ad0151a941686b2ed1875ec7038623ac0 (patch) | |
tree | a4437a36b5c72c35cf7b95e2f54224ddd1da2070 /t | |
parent | b78ce337def2db3a6fceee157f49202e5d1ce46a (diff) | |
download | git-f6bfea0ad0151a941686b2ed1875ec7038623ac0.zip git-f6bfea0ad0151a941686b2ed1875ec7038623ac0.tar.gz git-f6bfea0ad0151a941686b2ed1875ec7038623ac0.tar.bz2 |
revisions API users: use release_revisions() in builtin/log.c
In preparation for having the "log" family of functions make wider use
of release_revisions() let's have them call it just before
exiting. This changes the "log", "whatchanged", "show",
"format-patch", etc. commands, all of which live in this file.
The release_revisions() API still only frees the "pending" member, but
will learn to release more members of "struct rev_info" in subsequent
commits.
In the case of "format-patch" revert the addition of UNLEAK() in
dee839a2633 (format-patch: mark rev_info with UNLEAK, 2021-12-16),
which will cause several tests that previously passed under
"TEST_PASSES_SANITIZE_LEAK=true" to start failing.
In subsequent commits we'll now be able to use those tests to check
whether that part of the API is really leaking memory, and will fix
all of those memory leaks. Removing the UNLEAK() allows us to make
incremental progress in that direction. See [1] for further details
about this approach.
Note that the release_revisions() will not be sufficient to deal with
the code in cmd_show() added in 5d7eeee2ac6 (git-show: grok blobs,
trees and tags, too, 2006-12-14) which clobbers the "pending" array in
the case of "OBJ_COMMIT". That will need to be dealt with by some
future follow-up work.
1. https://lore.kernel.org/git/220218.861r00ib86.gmgdl@evledraar.gmail.com/
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t4126-apply-empty.sh | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/t/t4126-apply-empty.sh b/t/t4126-apply-empty.sh index 33860d3..66a7ba8 100755 --- a/t/t4126-apply-empty.sh +++ b/t/t4126-apply-empty.sh @@ -2,8 +2,6 @@ test_description='apply empty' - -TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh test_expect_success setup ' |