aboutsummaryrefslogtreecommitdiff
path: root/sequencer.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 /sequencer.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 'sequencer.c')
-rw-r--r--sequencer.c16
1 files changed, 8 insertions, 8 deletions
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);