[PATCH 1/4] git: update to v2.14
Signed-off-by: Jeff Smith --- Makefile | 2 +- git | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3d792ce..f3ee84c 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -GIT_VER = 2.13.4 +GIT_VER = 2.14.0 GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz INSTALL = install COPYTREE = cp -r diff --git a/git b/git index cf8899d..4384e3c 16 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit cf8899d285d2648013040ec7196ffd3de0606664 +Subproject commit 4384e3cde2ce8ecd194202e171ae16333d241326 -- 2.9.4 ___ CGit mailing list CGit@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/cgit
Re: [RFC PATCH 1/4] git: update to v2.14
On Wed, Jun 07, 2017 at 09:18:07PM -0500, Jeff Smith wrote: > Update to git version v2.14: commit 6b526ce (Merge branch bc/object-id) > merged changes for several functions from using sha1 hashes to using > struct object_id pointers. The functions that affect cgit are: > parse_object, lookup_commit_reference, lookup_tag, lookup_tree, and > parse_tree_indirect. > > Signed-off-by: Jeff Smith Of course, our tests fail with this patch because the submodule has been updated without the Makefile... other than that, the changes all look reasonable, so when 2.14 final is out and we can update the Makefile to a tag: Reviewed-by: John Keeping > --- > git | 2 +- > shared.c | 2 +- > ui-blob.c | 6 +++--- > ui-clone.c| 2 +- > ui-commit.c | 4 ++-- > ui-diff.c | 4 ++-- > ui-patch.c| 4 ++-- > ui-plain.c| 2 +- > ui-snapshot.c | 2 +- > ui-tag.c | 4 ++-- > ui-tree.c | 18 +- > 11 files changed, 25 insertions(+), 25 deletions(-) > > diff --git a/git b/git > index 2c04f63..8d1b103 16 > --- a/git > +++ b/git > @@ -1 +1 @@ > -Subproject commit 2c04f6340579518c55a554fcac9fe21c01b3d3ea > +Subproject commit 8d1b10321b20bd2a73a5b561cfc3cf2e8051b70b > diff --git a/shared.c b/shared.c > index 13a65a9..c93b193 100644 > --- a/shared.c > +++ b/shared.c > @@ -160,7 +160,7 @@ static struct refinfo *cgit_mk_refinfo(const char > *refname, const struct object_ > > ref = xmalloc(sizeof (struct refinfo)); > ref->refname = xstrdup(refname); > - ref->object = parse_object(oid->hash); > + ref->object = parse_object(oid); > switch (ref->object->type) { > case OBJ_TAG: > ref->tag = cgit_parse_tag((struct tag *)ref->object); > diff --git a/ui-blob.c b/ui-blob.c > index 793817f..761e886 100644 > --- a/ui-blob.c > +++ b/ui-blob.c > @@ -56,7 +56,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, > int file_only) > goto done; > if (sha1_object_info(oid.hash, &size) != OBJ_COMMIT) > goto done; > - read_tree_recursive(lookup_commit_reference(oid.hash)->tree, "", 0, 0, > &paths, walk_tree, &walk_tree_ctx); > + read_tree_recursive(lookup_commit_reference(&oid)->tree, "", 0, 0, > &paths, walk_tree, &walk_tree_ctx); > > done: > free(path_items.match); > @@ -89,7 +89,7 @@ int cgit_print_file(char *path, const char *head, int > file_only) > return -1; > type = sha1_object_info(oid.hash, &size); > if (type == OBJ_COMMIT) { > - commit = lookup_commit_reference(oid.hash); > + commit = lookup_commit_reference(&oid); > read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, > &walk_tree_ctx); > if (!walk_tree_ctx.found_path) > return -1; > @@ -145,7 +145,7 @@ void cgit_print_blob(const char *hex, char *path, const > char *head, int file_onl > type = sha1_object_info(oid.hash, &size); > > if ((!hex) && type == OBJ_COMMIT && path) { > - commit = lookup_commit_reference(oid.hash); > + commit = lookup_commit_reference(&oid); > read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, > &walk_tree_ctx); > type = sha1_object_info(oid.hash, &size); > } > diff --git a/ui-clone.c b/ui-clone.c > index 5f6606a..0d11672 100644 > --- a/ui-clone.c > +++ b/ui-clone.c > @@ -17,7 +17,7 @@ static int print_ref_info(const char *refname, const struct > object_id *oid, > { > struct object *obj; > > - if (!(obj = parse_object(oid->hash))) > + if (!(obj = parse_object(oid))) > return 0; > > htmlf("%s\t%s\n", oid_to_hex(oid), refname); > diff --git a/ui-commit.c b/ui-commit.c > index db69d54..e1d4a9b 100644 > --- a/ui-commit.c > +++ b/ui-commit.c > @@ -31,7 +31,7 @@ void cgit_print_commit(char *hex, const char *prefix) > "Bad object id: %s", hex); > return; > } > - commit = lookup_commit_reference(oid.hash); > + commit = lookup_commit_reference(&oid); > if (!commit) { > cgit_print_error_page(404, "Not found", > "Bad commit reference: %s", hex); > @@ -87,7 +87,7 @@ void cgit_print_commit(char *hex, const char *prefix) > free(tmp); > html("\n"); > for (p = commit->parents; p; p = p->next) { > - parent = lookup_commit_reference(p->item->object.oid.hash); > + parent = lookup_commit_reference(&p->item->object.oid); > if (!parent) { > html(""); > cgit_print_error("Error reading parent commit"); > diff --git a/ui-diff.c b/ui-diff.c > index 173d351..3d40876 100644 > --- a/ui-diff.c > +++ b/ui-diff.c > @@ -407,7 +407,7 @@ void cgit_print_diff(const char *new_rev, const char > *old_rev, > "Bad object name: %s", new_rev); > return
[RFC PATCH 1/4] git: update to v2.14
Update to git version v2.14: commit 6b526ce (Merge branch bc/object-id) merged changes for several functions from using sha1 hashes to using struct object_id pointers. The functions that affect cgit are: parse_object, lookup_commit_reference, lookup_tag, lookup_tree, and parse_tree_indirect. Signed-off-by: Jeff Smith --- git | 2 +- shared.c | 2 +- ui-blob.c | 6 +++--- ui-clone.c| 2 +- ui-commit.c | 4 ++-- ui-diff.c | 4 ++-- ui-patch.c| 4 ++-- ui-plain.c| 2 +- ui-snapshot.c | 2 +- ui-tag.c | 4 ++-- ui-tree.c | 18 +- 11 files changed, 25 insertions(+), 25 deletions(-) diff --git a/git b/git index 2c04f63..8d1b103 16 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 2c04f6340579518c55a554fcac9fe21c01b3d3ea +Subproject commit 8d1b10321b20bd2a73a5b561cfc3cf2e8051b70b diff --git a/shared.c b/shared.c index 13a65a9..c93b193 100644 --- a/shared.c +++ b/shared.c @@ -160,7 +160,7 @@ static struct refinfo *cgit_mk_refinfo(const char *refname, const struct object_ ref = xmalloc(sizeof (struct refinfo)); ref->refname = xstrdup(refname); - ref->object = parse_object(oid->hash); + ref->object = parse_object(oid); switch (ref->object->type) { case OBJ_TAG: ref->tag = cgit_parse_tag((struct tag *)ref->object); diff --git a/ui-blob.c b/ui-blob.c index 793817f..761e886 100644 --- a/ui-blob.c +++ b/ui-blob.c @@ -56,7 +56,7 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only) goto done; if (sha1_object_info(oid.hash, &size) != OBJ_COMMIT) goto done; - read_tree_recursive(lookup_commit_reference(oid.hash)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); + read_tree_recursive(lookup_commit_reference(&oid)->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); done: free(path_items.match); @@ -89,7 +89,7 @@ int cgit_print_file(char *path, const char *head, int file_only) return -1; type = sha1_object_info(oid.hash, &size); if (type == OBJ_COMMIT) { - commit = lookup_commit_reference(oid.hash); + commit = lookup_commit_reference(&oid); read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); if (!walk_tree_ctx.found_path) return -1; @@ -145,7 +145,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl type = sha1_object_info(oid.hash, &size); if ((!hex) && type == OBJ_COMMIT && path) { - commit = lookup_commit_reference(oid.hash); + commit = lookup_commit_reference(&oid); read_tree_recursive(commit->tree, "", 0, 0, &paths, walk_tree, &walk_tree_ctx); type = sha1_object_info(oid.hash, &size); } diff --git a/ui-clone.c b/ui-clone.c index 5f6606a..0d11672 100644 --- a/ui-clone.c +++ b/ui-clone.c @@ -17,7 +17,7 @@ static int print_ref_info(const char *refname, const struct object_id *oid, { struct object *obj; - if (!(obj = parse_object(oid->hash))) + if (!(obj = parse_object(oid))) return 0; htmlf("%s\t%s\n", oid_to_hex(oid), refname); diff --git a/ui-commit.c b/ui-commit.c index db69d54..e1d4a9b 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -31,7 +31,7 @@ void cgit_print_commit(char *hex, const char *prefix) "Bad object id: %s", hex); return; } - commit = lookup_commit_reference(oid.hash); + commit = lookup_commit_reference(&oid); if (!commit) { cgit_print_error_page(404, "Not found", "Bad commit reference: %s", hex); @@ -87,7 +87,7 @@ void cgit_print_commit(char *hex, const char *prefix) free(tmp); html("\n"); for (p = commit->parents; p; p = p->next) { - parent = lookup_commit_reference(p->item->object.oid.hash); + parent = lookup_commit_reference(&p->item->object.oid); if (!parent) { html(""); cgit_print_error("Error reading parent commit"); diff --git a/ui-diff.c b/ui-diff.c index 173d351..3d40876 100644 --- a/ui-diff.c +++ b/ui-diff.c @@ -407,7 +407,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, "Bad object name: %s", new_rev); return; } - commit = lookup_commit_reference(new_rev_oid->hash); + commit = lookup_commit_reference(new_rev_oid); if (!commit || parse_commit(commit)) { cgit_print_error_page(404, "Not found", "Bad commit: %s", oid_to_hex(new_rev_oid)); @@ -428,7 +428,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, } if (!is_null_oid(old_rev_oid)) { - commit