]> git.cameronkatri.com Git - cgit.git/commitdiff
git: update to v2.32.0 master
authorChristian Hesse <mail@eworm.de>
Tue, 18 May 2021 20:49:13 +0000 (22:49 +0200)
committerChristian Hesse <mail@eworm.de>
Tue, 8 Jun 2021 10:37:46 +0000 (12:37 +0200)
Update to git version v2.32.0, this requires changes for these
upstream commits:

47957485b3b731a7860e0554d2bd12c0dce1c75a
  tree.h API: simplify read_tree_recursive() signature

Signed-off-by: Christian Hesse <mail@eworm.de>
Makefile
git
ui-blame.c
ui-blob.c
ui-plain.c
ui-tree.c

index abc52bc5558741e870561d2cdbead7ec6cb58d30..d13c5bd13a2a0284eaba0ebd024ffa5c0099ef9d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ htmldir = $(docdir)
 pdfdir = $(docdir)
 mandir = $(prefix)/share/man
 SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 2.31.1
+GIT_VER = 2.32.0
 GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
 INSTALL = install
 COPYTREE = cp -r
diff --git a/git b/git
index 48bf2fa8bad054d66bd79c6ba903c89c704201f7..ebf3c04b262aa27fbb97f8a0156c2347fecafafb 160000 (submodule)
--- a/git
+++ b/git
@@ -1 +1 @@
-Subproject commit 48bf2fa8bad054d66bd79c6ba903c89c704201f7
+Subproject commit ebf3c04b262aa27fbb97f8a0156c2347fecafafb
index ec1d8888254a7b0eaad88ae44c9fbf2058d0422f..03136f78de3283a2d0632acf3847071624fe363b 100644 (file)
@@ -221,8 +221,7 @@ cleanup:
 }
 
 static int walk_tree(const struct object_id *oid, struct strbuf *base,
-                    const char *pathname, unsigned mode, int stage,
-                    void *cbdata)
+                    const char *pathname, unsigned mode, void *cbdata)
 {
        struct walk_tree_context *walk_tree_ctx = cbdata;
 
@@ -291,10 +290,8 @@ void cgit_print_blame(void)
        walk_tree_ctx.match_baselen = (path_items.match) ?
                                       basedir_len(path_items.match) : -1;
 
-       read_tree_recursive(the_repository,
-                           repo_get_commit_tree(the_repository, commit),
-                           "", 0, 0,
-                           &paths, walk_tree, &walk_tree_ctx);
+       read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
+                 &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)
index f76c641e355bda747dc74e9bfcaa727de284eaaf..c10ae42ebd054ef84dfbe01f3c99005518a078e5 100644 (file)
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -19,7 +19,7 @@ struct walk_tree_context {
 };
 
 static int walk_tree(const struct object_id *oid, struct strbuf *base,
-               const char *pathname, unsigned mode, int stage, void *cbdata)
+               const char *pathname, unsigned mode, void *cbdata)
 {
        struct walk_tree_context *walk_tree_ctx = cbdata;
 
@@ -56,9 +56,9 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)
                goto done;
        if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT)
                goto done;
-       read_tree_recursive(the_repository,
-                           repo_get_commit_tree(the_repository, lookup_commit_reference(the_repository, &oid)),
-                           "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
+       read_tree(the_repository,
+                 repo_get_commit_tree(the_repository, lookup_commit_reference(the_repository, &oid)),
+                 &paths, walk_tree, &walk_tree_ctx);
 
 done:
        free(path_items.match);
@@ -92,10 +92,8 @@ int cgit_print_file(char *path, const char *head, int file_only)
        type = oid_object_info(the_repository, &oid, &size);
        if (type == OBJ_COMMIT) {
                commit = lookup_commit_reference(the_repository, &oid);
-               read_tree_recursive(the_repository,
-                                   repo_get_commit_tree(the_repository, commit),
-                                   "", 0, 0, &paths, walk_tree,
-                                   &walk_tree_ctx);
+               read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
+                         &paths, walk_tree, &walk_tree_ctx);
                if (!walk_tree_ctx.found_path)
                        return -1;
                type = oid_object_info(the_repository, &oid, &size);
@@ -151,10 +149,8 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
 
        if ((!hex) && type == OBJ_COMMIT && path) {
                commit = lookup_commit_reference(the_repository, &oid);
-               read_tree_recursive(the_repository,
-                                   repo_get_commit_tree(the_repository, commit),
-                                   "", 0, 0, &paths, walk_tree,
-                                   &walk_tree_ctx);
+               read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
+                         &paths, walk_tree, &walk_tree_ctx);
                type = oid_object_info(the_repository, &oid, &size);
        }
 
index 001001c4ab4c319f4ed100dddaba09bc0eac7c92..65a205fad7017051863f6831170d98399ac12b19 100644 (file)
@@ -130,7 +130,7 @@ static void print_dir_tail(void)
 }
 
 static int walk_tree(const struct object_id *oid, struct strbuf *base,
-               const char *pathname, unsigned mode, int stage, void *cbdata)
+               const char *pathname, unsigned mode, void *cbdata)
 {
        struct walk_tree_context *walk_tree_ctx = cbdata;
 
@@ -198,9 +198,8 @@ void cgit_print_plain(void)
        }
        else
                walk_tree_ctx.match_baselen = basedir_len(path_items.match);
-       read_tree_recursive(the_repository,
-                           repo_get_commit_tree(the_repository, commit),
-                           "", 0, 0, &paths, walk_tree, &walk_tree_ctx);
+       read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
+                 &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)
index 1e4efb253d2b44ca0adf08ee354cacd3c675e079..b61f6f5433976202ea277bfa7bf5fd9aed4c4808 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -139,8 +139,7 @@ struct single_tree_ctx {
 };
 
 static int single_tree_cb(const struct object_id *oid, struct strbuf *base,
-                         const char *pathname, unsigned mode, int stage,
-                         void *cbdata)
+                         const char *pathname, unsigned mode, void *cbdata)
 {
        struct single_tree_ctx *ctx = cbdata;
 
@@ -185,8 +184,7 @@ static void write_tree_link(const struct object_id *oid, char *name,
                tree_ctx.name = NULL;
                tree_ctx.count = 0;
 
-               read_tree_recursive(the_repository, tree, "", 0, 1,
-                       &paths, single_tree_cb, &tree_ctx);
+               read_tree(the_repository, tree, &paths, single_tree_cb, &tree_ctx);
 
                if (tree_ctx.count != 1)
                        break;
@@ -199,7 +197,7 @@ static void write_tree_link(const struct object_id *oid, char *name,
 }
 
 static int ls_item(const struct object_id *oid, struct strbuf *base,
-               const char *pathname, unsigned mode, int stage, void *cbdata)
+               const char *pathname, unsigned mode, void *cbdata)
 {
        struct walk_tree_context *walk_tree_ctx = cbdata;
        char *name;
@@ -294,14 +292,13 @@ static void ls_tree(const struct object_id *oid, const char *path, struct walk_t
        }
 
        ls_head();
-       read_tree_recursive(the_repository, tree, "", 0, 1,
-               &paths, ls_item, walk_tree_ctx);
+       read_tree(the_repository, tree, &paths, ls_item, walk_tree_ctx);
        ls_tail();
 }
 
 
 static int walk_tree(const struct object_id *oid, struct strbuf *base,
-               const char *pathname, unsigned mode, int stage, void *cbdata)
+               const char *pathname, unsigned mode, void *cbdata)
 {
        struct walk_tree_context *walk_tree_ctx = cbdata;
 
@@ -326,7 +323,7 @@ static int walk_tree(const struct object_id *oid, struct strbuf *base,
                        return 0;
                }
        }
-       ls_item(oid, base, pathname, mode, stage, walk_tree_ctx);
+       ls_item(oid, base, pathname, mode, walk_tree_ctx);
        return 0;
 }
 
@@ -374,10 +371,8 @@ void cgit_print_tree(const char *rev, char *path)
                goto cleanup;
        }
 
-       read_tree_recursive(the_repository,
-                           repo_get_commit_tree(the_repository, commit),
-                           "", 0, 0,
-                           &paths, walk_tree, &walk_tree_ctx);
+       read_tree(the_repository, repo_get_commit_tree(the_repository, commit),
+                 &paths, walk_tree, &walk_tree_ctx);
        if (walk_tree_ctx.state == 1)
                ls_tail();
        else if (walk_tree_ctx.state == 2)