aboutsummaryrefslogtreecommitdiff
path: root/t
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 /t
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 't')
-rw-r--r--t/helper/test-reach.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c
index feabeb29c2..3131b54a87 100644
--- a/t/helper/test-reach.c
+++ b/t/helper/test-reach.c
@@ -120,12 +120,12 @@ int cmd__reach(int ac, const char **av)
exit(128);
printf("%s(A,X):\n", av[1]);
print_sorted_commit_ids(list);
- free_commit_list(list);
+ commit_list_free(list);
} else if (!strcmp(av[1], "reduce_heads")) {
struct commit_list *list = reduce_heads(X);
printf("%s(X):\n", av[1]);
print_sorted_commit_ids(list);
- free_commit_list(list);
+ commit_list_free(list);
} else if (!strcmp(av[1], "can_all_from_reach")) {
printf("%s(X,Y):%d\n", av[1], can_all_from_reach(X, Y, 1));
} else if (!strcmp(av[1], "can_all_from_reach_with_flag")) {
@@ -172,13 +172,13 @@ int cmd__reach(int ac, const char **av)
die(_("too many commits marked reachable"));
print_sorted_commit_ids(list);
- free_commit_list(list);
+ commit_list_free(list);
}
object_array_clear(&X_obj);
strbuf_release(&buf);
- free_commit_list(X);
- free_commit_list(Y);
+ commit_list_free(X);
+ commit_list_free(Y);
commit_stack_clear(&X_stack);
commit_stack_clear(&Y_stack);
return 0;