From 9f18d089c51fba2776fe1fece877a359c47417f7 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 15 Jan 2026 10:35:34 +0100 Subject: commit: rename `free_commit_list()` to conform to coding guidelines Our coding guidelines say that: Functions that operate on `struct S` are named `S_()` 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 Signed-off-by: Junio C Hamano --- submodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'submodule.c') diff --git a/submodule.c b/submodule.c index 40a5c6fb9d..85e9586e66 100644 --- a/submodule.c +++ b/submodule.c @@ -639,7 +639,7 @@ void show_submodule_diff_summary(struct diff_options *o, const char *path, print_submodule_diff_summary(sub, &rev, o); out: - free_commit_list(merge_bases); + commit_list_free(merge_bases); release_revisions(&rev); clear_commit_marks(left, ~0); clear_commit_marks(right, ~0); @@ -729,7 +729,7 @@ void show_submodule_inline_diff(struct diff_options *o, const char *path, done: strbuf_release(&sb); - free_commit_list(merge_bases); + commit_list_free(merge_bases); if (left) clear_commit_marks(left, ~0); if (right) -- cgit v1.3