]> git.ipfire.org Git - thirdparty/git.git/commitdiff
*: replace deprecated free_commit_list
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Thu, 28 May 2026 07:00:10 +0000 (09:00 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 May 2026 20:11:02 +0000 (05:11 +0900)
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 <ps@pks.im>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/history.c
replay.c
upload-pack.c

index 952693808574b794363d61b6fd49465d1455cda5..4c47ce494689ac0c3bb2c7673b228c210ffda1f5 100644 (file)
@@ -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;
 }
index f96f1f6551ae631d850dc1e928826e708342a193..4f1996485fdd9a959d7b93731f5276ca86c36921 100644 (file)
--- 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;
index 9f6d6fe48c8c58070bba6c6fabeaba128473e893..2bf450ab2880c712836b9695d01cfb8077917190 100644 (file)
@@ -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);
 }