public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Seyi Kufoiji <kuforiji98@gmail.com>
To: git@vger.kernel.org
Cc: Seyi Kufoiji <kuforiji98@gmail.com>
Subject: [PATCH 0/1] oidmap: make entry cleanup explicit in oidmap_clear
Date: Thu, 15 Jan 2026 14:16:33 +0100	[thread overview]
Message-ID: <20260115131634.51968-1-kuforiji98@gmail.com> (raw)

Hello,

This small patch improves the clarity and safety of oidmap cleanup by
making entry destruction explicit in oidmap_clear().

Previously, oidmap_clear() implicitly relied on callers to understand
how and when stored entries were freed. This change introduces an
explicit cleanup path, making ownership and lifecycle of oidmap entries
clearer and less error-prone.

In addition to the implementation change, unit tests are added to
exercise the cleanup semantics and verify correct behavior during map
teardown.

Thanks,
Seyi

Seyi Kufoiji (1):
  oidmap: make entry cleanup explicit in oidmap_clear

 oidmap.c                | 23 ++++++++++++++++++++---
 oidmap.h                | 15 +++++++++++++++
 t/unit-tests/u-oidmap.c | 41 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 76 insertions(+), 3 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-01-15 13:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 13:16 Seyi Kufoiji [this message]
2026-01-15 13:16 ` [PATCH 1/1] oidmap: make entry cleanup explicit in oidmap_clear Seyi Kufoiji

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260115131634.51968-1-kuforiji98@gmail.com \
    --to=kuforiji98@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox