List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 1/1] git: update to v2.51.1
@ 2025-10-16  7:53 Christian Hesse
  0 siblings, 0 replies; only message in thread
From: Christian Hesse @ 2025-10-16  7:53 UTC (permalink / raw)
  To: cgit; +Cc: Christian Hesse

From: Christian Hesse <mail@eworm.de>

Update to git version v2.51.1, this requires changes for these
upstream commits:

* e1d062e8ba0b72f49e9ef9713cc7011c330baab8
  odb: drop deprecated wrapper functions

Signed-off-by: Christian Hesse <mail@eworm.de>
---
 Makefile      |  2 +-
 git           |  2 +-
 parsing.c     |  2 +-
 shared.c      |  2 +-
 ui-blame.c    |  4 ++--
 ui-blob.c     | 14 +++++++-------
 ui-plain.c    |  4 ++--
 ui-snapshot.c |  2 +-
 ui-tree.c     |  8 ++++----
 9 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Makefile b/Makefile
index 60075af..b54f297 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.51.0
+GIT_VER = 2.51.1
 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 c44beea..81f86aa 160000
--- a/git
+++ b/git
@@ -1 +1 @@
-Subproject commit c44beea485f0f2feaf460e2ac87fdd5608d63cf0
+Subproject commit 81f86aacc4eb74cdb9c2c8082d36d2070c666045
diff --git a/parsing.c b/parsing.c
index 5616d43..115ce81 100644
--- a/parsing.c
+++ b/parsing.c
@@ -200,7 +200,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag)
 	const char *p;
 	struct taginfo *ret = NULL;
 
-	data = repo_read_object_file(the_repository, &tag->object.oid, &type, &size);
+	data = odb_read_object(the_repository->objects, &tag->object.oid, &type, &size);
 	if (!data || type != OBJ_TAG)
 		goto cleanup;
 
diff --git a/shared.c b/shared.c
index c1403b4..3838364 100644
--- a/shared.c
+++ b/shared.c
@@ -243,7 +243,7 @@ static int load_mmfile(mmfile_t *file, const struct object_id *oid)
 		file->ptr = (char *)"";
 		file->size = 0;
 	} else {
-		file->ptr = repo_read_object_file(the_repository, oid, &type,
+		file->ptr = odb_read_object(the_repository->objects, oid, &type,
 		                           (unsigned long *)&file->size);
 	}
 	return 1;
diff --git a/ui-blame.c b/ui-blame.c
index d07b67f..9c575ef 100644
--- a/ui-blame.c
+++ b/ui-blame.c
@@ -121,14 +121,14 @@ static void print_object(const struct object_id *oid, const char *path,
 	struct blame_origin *o;
 	struct blame_entry *ent = NULL;
 
-	type = oid_object_info(the_repository, oid, &size);
+	type = odb_read_object_info(the_repository->objects, oid, &size);
 	if (type == OBJ_BAD) {
 		cgit_print_error_page(404, "Not found", "Bad object name: %s",
 				      oid_to_hex(oid));
 		return;
 	}
 
-	buf = repo_read_object_file(the_repository, oid, &type, &size);
+	buf = odb_read_object(the_repository->objects, oid, &type, &size);
 	if (!buf) {
 		cgit_print_error_page(500, "Internal server error",
 			"Error reading object %s", oid_to_hex(oid));
diff --git a/ui-blob.c b/ui-blob.c
index e554fe9..bc91656 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)
 
 	if (repo_get_oid(the_repository, ref, &oid))
 		goto done;
-	if (oid_object_info(the_repository, &oid, &size) != OBJ_COMMIT)
+	if (odb_read_object_info(the_repository->objects, &oid, &size) != OBJ_COMMIT)
 		goto done;
 	read_tree(the_repository,
 		  repo_get_commit_tree(the_repository, lookup_commit_reference(the_repository, &oid)),
@@ -91,18 +91,18 @@ int cgit_print_file(char *path, const char *head, int file_only)
 
 	if (repo_get_oid(the_repository, head, &oid))
 		return -1;
-	type = oid_object_info(the_repository, &oid, &size);
+	type = odb_read_object_info(the_repository->objects, &oid, &size);
 	if (type == OBJ_COMMIT) {
 		commit = lookup_commit_reference(the_repository, &oid);
 		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);
+		type = odb_read_object_info(the_repository->objects, &oid, &size);
 	}
 	if (type == OBJ_BAD)
 		return -1;
-	buf = repo_read_object_file(the_repository, &oid, &type, &size);
+	buf = odb_read_object(the_repository->objects, &oid, &type, &size);
 	if (!buf)
 		return -1;
 	buf[size] = '\0';
@@ -147,13 +147,13 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
 		}
 	}
 
-	type = oid_object_info(the_repository, &oid, &size);
+	type = odb_read_object_info(the_repository->objects, &oid, &size);
 
 	if ((!hex) && type == OBJ_COMMIT && path) {
 		commit = lookup_commit_reference(the_repository, &oid);
 		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);
+		type = odb_read_object_info(the_repository->objects, &oid, &size);
 	}
 
 	if (type == OBJ_BAD) {
@@ -162,7 +162,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl
 		return;
 	}
 
-	buf = repo_read_object_file(the_repository, &oid, &type, &size);
+	buf = odb_read_object(the_repository->objects, &oid, &type, &size);
 	if (!buf) {
 		cgit_print_error_page(500, "Internal server error",
 				"Error reading object %s", hex);
diff --git a/ui-plain.c b/ui-plain.c
index 4d69607..0301439 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -24,13 +24,13 @@ static int print_object(const struct object_id *oid, const char *path)
 	char *buf, *mimetype;
 	unsigned long size;
 
-	type = oid_object_info(the_repository, oid, &size);
+	type = odb_read_object_info(the_repository->objects, oid, &size);
 	if (type == OBJ_BAD) {
 		cgit_print_error_page(404, "Not found", "Not found");
 		return 0;
 	}
 
-	buf = repo_read_object_file(the_repository, oid, &type, &size);
+	buf = odb_read_object(the_repository->objects, oid, &type, &size);
 	if (!buf) {
 		cgit_print_error_page(404, "Not found", "Not found");
 		return 0;
diff --git a/ui-snapshot.c b/ui-snapshot.c
index 3e38cd5..d157222 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -192,7 +192,7 @@ static int write_sig(const struct cgit_snapshot_format *format,
 		return 0;
 	}
 
-	buf = repo_read_object_file(the_repository, note, &type, &size);
+	buf = odb_read_object(the_repository->objects, note, &type, &size);
 	if (!buf) {
 		cgit_print_error_page(404, "Not found", "Not found");
 		return 0;
diff --git a/ui-tree.c b/ui-tree.c
index 3d8a2eb..5ac8c9a 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -93,14 +93,14 @@ static void print_object(const struct object_id *oid, const char *path, const ch
 	unsigned long size;
 	bool is_binary;
 
-	type = oid_object_info(the_repository, oid, &size);
+	type = odb_read_object_info(the_repository->objects, oid, &size);
 	if (type == OBJ_BAD) {
 		cgit_print_error_page(404, "Not found",
 			"Bad object name: %s", oid_to_hex(oid));
 		return;
 	}
 
-	buf = repo_read_object_file(the_repository, oid, &type, &size);
+	buf = odb_read_object(the_repository->objects, oid, &type, &size);
 	if (!buf) {
 		cgit_print_error_page(500, "Internal server error",
 			"Error reading object %s", oid_to_hex(oid));
@@ -217,7 +217,7 @@ static int ls_item(const struct object_id *oid, struct strbuf *base,
 		    ctx.qry.path ? "/" : "", name);
 
 	if (!S_ISGITLINK(mode)) {
-		type = oid_object_info(the_repository, oid, &size);
+		type = odb_read_object_info(the_repository->objects, oid, &size);
 		if (type == OBJ_BAD) {
 			htmlf("<tr><td colspan='3'>Bad object: %s %s</td></tr>",
 			      name,
@@ -244,7 +244,7 @@ static int ls_item(const struct object_id *oid, struct strbuf *base,
 	}
 	if (S_ISLNK(mode)) {
 		html(" -> ");
-		buf = repo_read_object_file(the_repository, oid, &type, &size);
+		buf = odb_read_object(the_repository->objects, oid, &type, &size);
 		if (!buf) {
 			htmlf("Error reading object: %s", oid_to_hex(oid));
 			goto cleanup;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-16  7:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16  7:53 [PATCH 1/1] git: update to v2.51.1 Christian Hesse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).