From 7dd898a92ddc2318c3516c06fb6769c3e64216ed Mon Sep 17 00:00:00 2001 From: Kristoffer Haugsbakk Date: Thu, 28 May 2026 09:00:10 +0200 Subject: [PATCH 1/2] *: replace deprecated free_commit_list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace `free_commit_list` with `commit_list_free`. The former was deprecated in 9f18d089 (commit: rename `free_commit_list()` to conform to coding guidelines, 2026-01-15). This allows us to remove all the deprecated functions in the next commit: • `copy_commit_list` • `reverse_commit_list` • `free_commit_list` Acked-by: Patrick Steinhardt Signed-off-by: Kristoffer Haugsbakk Signed-off-by: Junio C Hamano --- builtin/history.c | 4 ++-- replay.c | 2 +- upload-pack.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/history.c b/builtin/history.c index 9526938085..4c47ce4946 100644 --- a/builtin/history.c +++ b/builtin/history.c @@ -272,7 +272,7 @@ static int setup_revwalk(struct repository *repo, commit_list_insert(original, &from_list); ret = repo_is_descendant_of(repo, head, from_list); - free_commit_list(from_list); + commit_list_free(from_list); if (ret < 0) { ret = error(_("cannot determine descendance")); @@ -649,7 +649,7 @@ out: if (index_file.len) unlink(index_file.buf); strbuf_release(&index_file); - free_commit_list(parents); + commit_list_free(parents); release_index(&index); return ret; } diff --git a/replay.c b/replay.c index f96f1f6551..4f1996485f 100644 --- a/replay.c +++ b/replay.c @@ -120,7 +120,7 @@ static struct commit *create_commit(struct repository *repo, out: repo_unuse_commit_buffer(repo, based_on, message); free_commit_extra_headers(extra); - free_commit_list(parents); + commit_list_free(parents); strbuf_release(&msg); free(author); return (struct commit *)obj; diff --git a/upload-pack.c b/upload-pack.c index 9f6d6fe48c..2bf450ab28 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -886,7 +886,7 @@ static void deepen(struct upload_pack_data *data, int depth) data->deepen_relative, depth, SHALLOW, NOT_SHALLOW); send_shallow(data, result); - free_commit_list(result); + commit_list_free(result); } send_unshallow(data); @@ -900,7 +900,7 @@ static void deepen_by_rev_list(struct upload_pack_data *data, disable_commit_graph(the_repository); result = get_shallow_commits_by_rev_list(argv, SHALLOW, NOT_SHALLOW); send_shallow(data, result); - free_commit_list(result); + commit_list_free(result); send_unshallow(data); } From 83e7f3bd2bac934c21f39175b965c37810a41ea5 Mon Sep 17 00:00:00 2001 From: Kristoffer Haugsbakk Date: Thu, 28 May 2026 09:00:11 +0200 Subject: [PATCH 2/2] commit: remove deprecated functions These functions were deprecated in a series of commits merged in 52882024 (Merge branch 'ps/commit-list-functions-renamed', 2026-02-13). The compatibility was for in-flight topics at the time. Acked-by: Patrick Steinhardt Signed-off-by: Kristoffer Haugsbakk Signed-off-by: Junio C Hamano --- commit.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/commit.h b/commit.h index 58150045af..5352056f87 100644 --- a/commit.h +++ b/commit.h @@ -203,25 +203,6 @@ struct commit_list *commit_list_reverse(struct commit_list *list); void commit_list_free(struct commit_list *list); -/* - * Deprecated compatibility functions for `struct commit_list`, to be removed - * once Git 2.53 is released. - */ -static inline struct commit_list *copy_commit_list(struct commit_list *l) -{ - return commit_list_copy(l); -} - -static inline struct commit_list *reverse_commit_list(struct commit_list *l) -{ - return commit_list_reverse(l); -} - -static inline void free_commit_list(struct commit_list *l) -{ - commit_list_free(l); -} - struct rev_info; /* in revision.h, it circularly uses enum cmit_fmt */ const char *repo_logmsg_reencode(struct repository *r,