]> git.ipfire.org Git - thirdparty/git.git/commit
revisions API: add a TODO for diff_free(&revs->diffopt)
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 14 Apr 2022 05:56:40 +0000 (07:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 14 Apr 2022 06:56:10 +0000 (23:56 -0700)
commit54c8a7c379fc37a847b8a5ec5c419eae171322e1
treebfaa0f95925802963df3f5cf969bd47c8d3c43e8
parentae1b383dfa945d98ec3cedd744619c2028d6edf7
revisions API: add a TODO for diff_free(&revs->diffopt)

Add a TODO comment indicating that we should release "diffopt" in
release_revisions(). In a preceding commit we started releasing the
"pruning" member of the same type, but handling "diffopt" will require
us to untangle the "no_free" conditions I added in e900d494dcf (diff:
add an API for deferred freeing, 2021-02-11).

Let's leave a TODO comment to that effect, and so that we don't forget
refactor code that was changed to use release_revisions() in earlier
commits to stop using the "diffopt" member after a call to
release_revisions(). This works currently, but would become a logic
error as soon as we started freeing "diffopt". Doing that change now
doesn't harm anything, and future-proofs us against a later change to
release_revisions().

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-lib.c
revision.c
wt-status.c