aboutsummaryrefslogtreecommitdiff
path: root/reflog.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-01-15 10:35:34 +0100
committerJunio C Hamano <gitster@pobox.com>2026-01-15 05:32:31 -0800
commit9f18d089c51fba2776fe1fece877a359c47417f7 (patch)
treee51d5ec9b79ebda7f0b928d7c71f4d36adad4a81 /reflog.c
parenta468f3cefab32eed7d9a12bd6b93719d38ec67a6 (diff)
downloadgit-9f18d089c51fba2776fe1fece877a359c47417f7.tar.xz
commit: rename `free_commit_list()` to conform to coding guidelines
Our coding guidelines say that: Functions that operate on `struct S` are named `S_<verb>()` and should generally receive a pointer to `struct S` as first parameter. While most of the functions related to `struct commit_list` already follow that naming schema, `free_commit_list()` doesn't. Rename the function to address this and adjust all of its callers. Add a compatibility wrapper for the old function name to ease the transition and avoid any semantic conflicts with in-flight patch series. This wrapper will be removed once Git 2.53 has been released. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reflog.c')
-rw-r--r--reflog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/reflog.c b/reflog.c
index ac87e20c4f..1460ae9d0d 100644
--- a/reflog.c
+++ b/reflog.c
@@ -493,7 +493,7 @@ void reflog_expiry_cleanup(void *cb_data)
case UE_HEAD:
for (elem = cb->tips; elem; elem = elem->next)
clear_commit_marks(elem->item, REACHABLE);
- free_commit_list(cb->tips);
+ commit_list_free(cb->tips);
break;
case UE_NORMAL:
clear_commit_marks(cb->tip_commit, REACHABLE);
@@ -501,7 +501,7 @@ void reflog_expiry_cleanup(void *cb_data)
}
for (elem = cb->mark_list; elem; elem = elem->next)
clear_commit_marks(elem->item, REACHABLE);
- free_commit_list(cb->mark_list);
+ commit_list_free(cb->mark_list);
}
int count_reflog_ent(const char *refname UNUSED,