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 --- sequencer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sequencer.c') diff --git a/sequencer.c b/sequencer.c index e09f8eed55..f5a6496937 100644 --- a/sequencer.c +++ b/sequencer.c @@ -1698,7 +1698,7 @@ static int try_to_commit(struct repository *r, out: free_commit_extra_headers(extra); - free_commit_list(parents); + commit_list_free(parents); strbuf_release(&err); strbuf_release(&commit_msg); free(amend_author); @@ -2476,8 +2476,8 @@ static int do_pick_commit(struct repository *r, res |= try_merge_command(r, opts->strategy, opts->xopts.nr, opts->xopts.v, common, oid_to_hex(&head), remotes); - free_commit_list(common); - free_commit_list(remotes); + commit_list_free(common); + commit_list_free(remotes); } /* @@ -4381,8 +4381,8 @@ static int do_merge(struct repository *r, leave_merge: strbuf_release(&ref_name); rollback_lock_file(&lock); - free_commit_list(to_merge); - free_commit_list(bases); + commit_list_free(to_merge); + commit_list_free(bases); return ret; } @@ -6039,11 +6039,11 @@ static int make_script_with_merges(struct pretty_print_context *pp, oidset_insert(&shown, oid); } - free_commit_list(list); + commit_list_free(list); } - free_commit_list(commits); - free_commit_list(tips); + commit_list_free(commits); + commit_list_free(tips); strbuf_release(&label_from_message); strbuf_release(&oneline); -- cgit v1.3-6-g1900