git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] *: replace deprecated free_commit_list

From
Kkristofferhaugsbakk@fastmail.com <kristofferhaugsbakk@fastmail.com>
Date
May 27, 2026, 13:59 UTC
Message-ID
<commit.h_replace_deprecated.715@msgid.xyz>
In-Reply-To
<CV_commit.h_remove_deprecated.714@msgid.xyz>
From: Kristoffer Haugsbakk <code@khaugsbakk.name>

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`

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
---
 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 0fc06fb2045..091465a59e2 100644
--- a/builtin/history.c
+++ b/builtin/history.c
@@ -284,7 +284,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"));
@@ -892,7 +892,7 @@ static int split_commit(struct repository *repo,
 	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 4ef8abb6077..da531d5bc68 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 9f6d6fe48c8..2bf450ab288 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);
 }
 
-- 
2.54.0.6.gf6fa7dd4140
Previous: kristofferhaugsbakk@fastmail.comNext: Patrick Steinhardt
Message 2 of 13 in “commit: remove deprecated functions”
  1. 0/2 commit: remove deprecated functionskristofferhaugsbakk@fastmail.com, May 27, 2026
  2. 1/2 *: replace deprecated free_commit_listkristofferhaugsbakk@fastmail.com, May 27, 2026
  3. Patrick SteinhardtMay 28, 2026
  4. Kristoffer HaugsbakkMay 28, 2026
  5. 2/2 commit: remove deprecated functionskristofferhaugsbakk@fastmail.com, May 27, 2026
  6. Patrick SteinhardtMay 28, 2026
  7. 0/2 commit: remove deprecated functionskristofferhaugsbakk@fastmail.com, May 28, 2026
  8. 1/2 *: replace deprecated free_commit_listkristofferhaugsbakk@fastmail.com, May 28, 2026
  9. 2/2 commit: remove deprecated functionskristofferhaugsbakk@fastmail.com, May 28, 2026
  10. Jeff KingMay 29, 2026
  11. Patrick SteinhardtJun 1, 2026
  12. Junio C HamanoJun 1, 2026
  13. Jeff KingJun 2, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.