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 --- builtin/diff-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/diff-tree.c') diff --git a/builtin/diff-tree.c b/builtin/diff-tree.c index 49dd4d00eb..cd35d1c915 100644 --- a/builtin/diff-tree.c +++ b/builtin/diff-tree.c @@ -33,7 +33,7 @@ static int stdin_diff_commit(struct commit *commit, const char *p) struct commit *parent = lookup_commit(the_repository, &oid); if (!pptr) { /* Free the real parent list */ - free_commit_list(commit->parents); + commit_list_free(commit->parents); commit->parents = NULL; pptr = &(commit->parents); } -- cgit v1.3