mirror of
https://git.zx2c4.com/cgit
synced 2024-11-25 01:48:41 +00:00
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>
This commit is contained in:
parent
68de710c1c
commit
985fba80d0
2
Makefile
2
Makefile
@ -14,7 +14,7 @@ htmldir = $(docdir)
|
|||||||
pdfdir = $(docdir)
|
pdfdir = $(docdir)
|
||||||
mandir = $(prefix)/share/man
|
mandir = $(prefix)/share/man
|
||||||
SHA1_HEADER = <openssl/sha.h>
|
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
|
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
|
||||||
INSTALL = install
|
INSTALL = install
|
||||||
COPYTREE = cp -r
|
COPYTREE = cp -r
|
||||||
|
2
git
2
git
@ -1 +1 @@
|
|||||||
Subproject commit 5d826e972970a784bd7a7bdf587512510097b8c7
|
Subproject commit 8104ec994ea3849a968b4667d072fedd1e688642
|
@ -140,7 +140,7 @@ void cgit_print_atom(char *tip, const char *path, int max_count)
|
|||||||
}
|
}
|
||||||
while ((commit = get_revision(&rev)) != NULL) {
|
while ((commit = get_revision(&rev)) != NULL) {
|
||||||
add_entry(commit, host);
|
add_entry(commit, host);
|
||||||
free_commit_buffer(commit);
|
free_commit_buffer(the_repository->parsed_objects, commit);
|
||||||
free_commit_list(commit->parents);
|
free_commit_list(commit->parents);
|
||||||
commit->parents = NULL;
|
commit->parents = NULL;
|
||||||
}
|
}
|
||||||
|
@ -290,8 +290,8 @@ void cgit_print_blame(void)
|
|||||||
walk_tree_ctx.match_baselen = (path_items.match) ?
|
walk_tree_ctx.match_baselen = (path_items.match) ?
|
||||||
basedir_len(path_items.match) : -1;
|
basedir_len(path_items.match) : -1;
|
||||||
|
|
||||||
read_tree_recursive(commit->maybe_tree, "", 0, 0, &paths, walk_tree,
|
read_tree_recursive(the_repository, commit->maybe_tree, "", 0, 0,
|
||||||
&walk_tree_ctx);
|
&paths, walk_tree, &walk_tree_ctx);
|
||||||
if (!walk_tree_ctx.state)
|
if (!walk_tree_ctx.state)
|
||||||
cgit_print_error_page(404, "Not found", "Not found");
|
cgit_print_error_page(404, "Not found", "Not found");
|
||||||
else if (walk_tree_ctx.state == 2)
|
else if (walk_tree_ctx.state == 2)
|
||||||
|
@ -56,7 +56,8 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
|
|||||||
goto done;
|
goto done;
|
||||||
if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT)
|
if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT)
|
||||||
goto done;
|
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:
|
done:
|
||||||
free(path_items.match);
|
free(path_items.match);
|
||||||
@ -90,7 +91,8 @@ int cgit_print_file(char *path, const char *head, int file_only)
|
|||||||
type = oid_object_info(the_repository, &oid, &size);
|
type = oid_object_info(the_repository, &oid, &size);
|
||||||
if (type == OBJ_COMMIT) {
|
if (type == OBJ_COMMIT) {
|
||||||
commit = lookup_commit_reference(the_repository, &oid);
|
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)
|
if (!walk_tree_ctx.found_path)
|
||||||
return -1;
|
return -1;
|
||||||
type = oid_object_info(the_repository, &oid, &size);
|
type = oid_object_info(the_repository, &oid, &size);
|
||||||
@ -146,7 +148,8 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
|
|||||||
|
|
||||||
if ((!hex) && type == OBJ_COMMIT && path) {
|
if ((!hex) && type == OBJ_COMMIT && path) {
|
||||||
commit = lookup_commit_reference(the_repository, &oid);
|
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);
|
type = oid_object_info(the_repository, &oid, &size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
ui-log.c
4
ui-log.c
@ -488,7 +488,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
|
|||||||
for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; /* nop */) {
|
for (i = 0; i < ofs && (commit = get_revision(&rev)) != NULL; /* nop */) {
|
||||||
if (show_commit(commit, &rev))
|
if (show_commit(commit, &rev))
|
||||||
i++;
|
i++;
|
||||||
free_commit_buffer(commit);
|
free_commit_buffer(the_repository->parsed_objects, commit);
|
||||||
free_commit_list(commit->parents);
|
free_commit_list(commit->parents);
|
||||||
commit->parents = NULL;
|
commit->parents = NULL;
|
||||||
}
|
}
|
||||||
@ -510,7 +510,7 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern
|
|||||||
i++;
|
i++;
|
||||||
print_commit(commit, &rev);
|
print_commit(commit, &rev);
|
||||||
}
|
}
|
||||||
free_commit_buffer(commit);
|
free_commit_buffer(the_repository->parsed_objects, commit);
|
||||||
free_commit_list(commit->parents);
|
free_commit_list(commit->parents);
|
||||||
commit->parents = NULL;
|
commit->parents = NULL;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,8 @@ void cgit_print_plain(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
walk_tree_ctx.match_baselen = basedir_len(path_items.match);
|
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)
|
if (!walk_tree_ctx.match)
|
||||||
cgit_print_error_page(404, "Not found", "Not found");
|
cgit_print_error_page(404, "Not found", "Not found");
|
||||||
else if (walk_tree_ctx.match == 2)
|
else if (walk_tree_ctx.match == 2)
|
||||||
|
@ -241,7 +241,7 @@ static struct string_list collect_stats(const struct cgit_period *period)
|
|||||||
memset(&authors, 0, sizeof(authors));
|
memset(&authors, 0, sizeof(authors));
|
||||||
while ((commit = get_revision(&rev)) != NULL) {
|
while ((commit = get_revision(&rev)) != NULL) {
|
||||||
add_commit(&authors, commit, period);
|
add_commit(&authors, commit, period);
|
||||||
free_commit_buffer(commit);
|
free_commit_buffer(the_repository->parsed_objects, commit);
|
||||||
free_commit_list(commit->parents);
|
free_commit_list(commit->parents);
|
||||||
commit->parents = NULL;
|
commit->parents = NULL;
|
||||||
}
|
}
|
||||||
|
10
ui-tree.c
10
ui-tree.c
@ -185,8 +185,8 @@ static void write_tree_link(const struct object_id *oid, char *name,
|
|||||||
tree_ctx.name = NULL;
|
tree_ctx.name = NULL;
|
||||||
tree_ctx.count = 0;
|
tree_ctx.count = 0;
|
||||||
|
|
||||||
read_tree_recursive(tree, "", 0, 1, &paths, single_tree_cb,
|
read_tree_recursive(the_repository, tree, "", 0, 1,
|
||||||
&tree_ctx);
|
&paths, single_tree_cb, &tree_ctx);
|
||||||
|
|
||||||
if (tree_ctx.count != 1)
|
if (tree_ctx.count != 1)
|
||||||
break;
|
break;
|
||||||
@ -294,7 +294,8 @@ static void ls_tree(const struct object_id *oid, const char *path, struct walk_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
ls_head();
|
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();
|
ls_tail();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,7 +374,8 @@ void cgit_print_tree(const char *rev, char *path)
|
|||||||
goto cleanup;
|
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)
|
if (walk_tree_ctx.state == 1)
|
||||||
ls_tail();
|
ls_tail();
|
||||||
else if (walk_tree_ctx.state == 2)
|
else if (walk_tree_ctx.state == 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user