summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_initial..side
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2026-07-02 04:03:19 -0400
committerJunio C Hamano <gitster@pobox.com>2026-07-02 09:50:47 -0700
commit46ba44e1fd6b1a3d71d529f6713821efc26072c9 (patch)
tree4992cbaaa46bc60f36376b6e2bb580008a164fa2 /t/t4013/diff.diff_initial..side
parent64337aecded9e91a766b585b86bcf5f0342e0b87 (diff)
csum-file: provide a function to release checkpoints
A hashfile_checkpoint struct is basically just a copy of the hash_ctx state at a given point in the file. As such, it contains its own git_hash_ctx which may (depending on the underlying hash implementation) need to be discarded when we're done with it. Let's add a "release" function which cleans up the hash context it holds. I chose "release" here and not "discard" because you'd use this to clean up every checkpoint, whether you used it or not. As opposed to git_hash_discard(), which is needed only if you didn't call git_hash_final(). There are only two callers which use hashfile_checkpoints, and we can add release calls to both. When built with "SANITIZE=leak OPENSSL_SHA1_UNSAFE=1", this makes both t1050 and t9300 leak-free. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions