aboutsummaryrefslogtreecommitdiff
path: root/oidmap.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2025-05-12 14:50:28 -0400
committerJunio C Hamano <gitster@pobox.com>2025-05-12 13:06:26 -0700
commit274464683462d04363d2107822b0f9d2d5a27623 (patch)
treefff31b68ef17cd2468be4efb91402daf1f842488 /oidmap.c
parent7a1d2bd0a596f42a8a7a68d55577967bb454fec0 (diff)
downloadgit-274464683462d04363d2107822b0f9d2d5a27623.tar.xz
oidmap: rename oidmap_free() to oidmap_clear()
This function does not free the oidmap struct itself; it just drops all items from the map (using hashmap_clear_() internally). It should be called oidmap_clear(), per CodingGuidelines. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'oidmap.c')
-rw-r--r--oidmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/oidmap.c b/oidmap.c
index 8b1bc4dec9..508d6c7dec 100644
--- a/oidmap.c
+++ b/oidmap.c
@@ -22,7 +22,7 @@ void oidmap_init(struct oidmap *map, size_t initial_size)
hashmap_init(&map->map, oidmap_neq, NULL, initial_size);
}
-void oidmap_free(struct oidmap *map, int free_entries)
+void oidmap_clear(struct oidmap *map, int free_entries)
{
if (!map)
return;