Author: Christian Hesse <mail@eworm.de>
git: update to v2.21.0 Update to git version v2.21.0. Required changes follow upstream commits: * 6a7895fd8a3bd409f2b71ffc355d5142172cc2a0 (commit: prepare free_commit_buffer and release_commit_memory for any repo) * e092073d643b17c82d72cf692fbfaea9c9796f11 (tree.c: make read_tree*() take 'struct repository *') Signed-off-by: Christian Hesse <mail@eworm.de> Reviewed-by: John Keeping <john@keeping.me.uk>
Makefile | 2 +- ui-atom.c | 2 +- ui-blame.c | 4 ++-- ui-blob.c | 9 ++++++--- ui-log.c | 4 ++-- ui-plain.c | 3 ++- ui-stats.c | 2 +- ui-tree.c | 10 ++++++----
diff --git a/Makefile b/Makefile index e690c7f4bc3f9fd3109e0740d25eb2ca57b393f5..40f4fd884f4c90a2b4d75eeb8e11bbf2c1d65fa9 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = <openssl/sha.h> -GIT_VER = 2.20.0 +GIT_VER = 2.21.0 GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz INSTALL = install COPYTREE = cp -r diff --git a/ui-atom.c b/ui-atom.c index cd66f82f082b9cc078584438d7864388e268013c..1056f36397521d0fc037219ec9fa6e07d658f3e6 100644 --- a/ui-atom.c +++ b/ui-atom.c @@ -140,7 +140,7 @@ free(repourl); } while ((commit = get_revision(&rev)) != NULL) { add_entry(commit, host); - free_commit_buffer(commit); + free_commit_buffer(the_repository->parsed_objects, commit); free_commit_list(commit->parents); commit->parents = NULL; } diff --git a/ui-blame.c b/ui-blame.c index c52cb9b85f53750c655c5253018f2583e0efea80..644c30ad289e79f98b59b49aac1aef18028e9118 100644 --- a/ui-blame.c +++ b/ui-blame.c @@ -290,8 +290,8 @@ walk_tree_ctx.curr_rev = xstrdup(rev); walk_tree_ctx.match_baselen = (path_items.match) ? basedir_len(path_items.match) : -1; - read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, - &walk_tree_ctx); + read_tree_recursive(the_repository, commit->maybe_tree, "", 0, 0, + &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.state) cgit_print_error_page(404, "Not found", "Not found"); else if (walk_tree_ctx.state == 2) diff --git a/ui-blob.c b/ui-blob.c index 4b6b46277acf12d6f837d29530289568c64442de..30e2d4bf5f5484e1a5cd3541e8531f110a1e91f0 100644 --- a/ui-blob.c +++ b/ui-blob.c @@ -56,7 +56,8 @@ if (get_oid(ref, &oid)) goto done; if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT) goto done; - read_tree_recursive(lookup_commit_reference(the_repository, &oid)->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree_recursive(the_repository, lookup_commit_reference(the_repository, &oid)->maybe_tree, + "", 0, 0, &paths, walk_tree, &walk_tree_ctx); done: free(path_items.match); @@ -90,7 +91,8 @@ return -1; type = oid_object_info(the_repository, &oid, &size); if (type == OBJ_COMMIT) { commit = lookup_commit_reference(the_repository, &oid); - read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree_recursive(the_repository, commit->maybe_tree, + "", 0, 0, &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.found_path) return -1; type = oid_object_info(the_repository, &oid, &size); @@ -146,7 +148,8 @@ type = oid_object_info(the_repository, &oid, &size); if ((!hex) && type == OBJ_COMMIT && path) { commit = lookup_commit_reference(the_repository, &oid); - read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree_recursive(the_repository, commit->maybe_tree, + "", 0, 0, &paths, walk_tree, &walk_tree_ctx); type = oid_object_info(the_repository, &oid, &size); } diff --git a/ui-log.c b/ui-log.c index 8c654257b16b926aab928246a0b9e6f98cfbcd06..dc5cb1eb6a0b34e7a0cc197cb397fc002248ee1e 100644 --- a/ui-log.c +++ b/ui-log.c @@ -488,7 +488,7 @@ for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; /* nop */) { if (show_commit(commit, &rev)) i++; - free_commit_buffer(commit); + free_commit_buffer(the_repository->parsed_objects, commit); free_commit_list(commit->parents); commit->parents = NULL; } @@ -510,7 +510,7 @@ if (show_commit(commit, &rev)) { i++; print_commit(commit, &rev); } - free_commit_buffer(commit); + free_commit_buffer(the_repository->parsed_objects, commit); free_commit_list(commit->parents); commit->parents = NULL; } diff --git a/ui-plain.c b/ui-plain.c index 070c34bccec5be20feb66379ab0f5ec777b991de..b73c1cfed15fa0350d2004bf17107814f1165867 100644 --- a/ui-plain.c +++ b/ui-plain.c @@ -198,7 +198,8 @@ walk_tree_ctx.match = 2; } else walk_tree_ctx.match_baselen = basedir_len(path_items.match); - read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree_recursive(the_repository, commit->maybe_tree, + "", 0, 0, &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.match) cgit_print_error_page(404, "Not found", "Not found"); else if (walk_tree_ctx.match == 2) diff --git a/ui-stats.c b/ui-stats.c index 7acd358d0f1ca7a137ae901481ae36b1d3374cfd..7272a61a2fff0b0c94f693b1680be3f9157fef1f 100644 --- a/ui-stats.c +++ b/ui-stats.c @@ -241,7 +241,7 @@ prepare_revision_walk(&rev); memset(&authors, 0, sizeof(authors)); while ((commit = get_revision(&rev)) != NULL) { add_commit(&authors, commit, period); - free_commit_buffer(commit); + free_commit_buffer(the_repository->parsed_objects, commit); free_commit_list(commit->parents); commit->parents = NULL; } diff --git a/ui-tree.c b/ui-tree.c index 314ac5299fc5dca99949d2cb24394c52fb2c91d5..4be89c8e7fcbf7ac68cca848a86a438f6c3e1235 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -185,8 +185,8 @@ free(tree_ctx.name); tree_ctx.name = NULL; tree_ctx.count = 0; - read_tree_recursive(tree, "", 0, 1, &paths, single_tree_cb, - &tree_ctx); + read_tree_recursive(the_repository, tree, "", 0, 1, + &paths, single_tree_cb, &tree_ctx); if (tree_ctx.count != 1) break; @@ -294,7 +294,8 @@ return; } ls_head(); - read_tree_recursive(tree, "", 0, 1, &paths, ls_item, walk_tree_ctx); + read_tree_recursive(the_repository, tree, "", 0, 1, + &paths, ls_item, walk_tree_ctx); ls_tail(); } @@ -373,7 +374,8 @@ ls_tree(&commit->maybe_tree->object.oid, NULL, &walk_tree_ctx); goto cleanup; } - read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree_recursive(the_repository, commit->maybe_tree, "", 0, 0, + &paths, walk_tree, &walk_tree_ctx); if (walk_tree_ctx.state == 1) ls_tail(); else if (walk_tree_ctx.state == 2)