aboutsummaryrefslogtreecommitdiff
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--cgit.c8
m---------git0
-rw-r--r--parsing.c2
-rw-r--r--shared.c2
-rw-r--r--ui-atom.c2
-rw-r--r--ui-blame.c2
-rw-r--r--ui-blob.c2
-rw-r--r--ui-clone.c5
-rw-r--r--ui-commit.c2
-rw-r--r--ui-diff.c4
-rw-r--r--ui-log.c5
-rw-r--r--ui-patch.c4
-rw-r--r--ui-plain.c2
-rw-r--r--ui-refs.c11
-rw-r--r--ui-shared.c8
-rw-r--r--ui-snapshot.c2
-rw-r--r--ui-stats.c2
-rw-r--r--ui-tag.c2
-rw-r--r--ui-tree.c2
20 files changed, 12 insertions, 57 deletions
diff --git a/Makefile b/Makefile
index 7f8a5cb..1eb64ea 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.46.0
+GIT_VER = 2.45.2
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
INSTALL = install
COPYTREE = cp -r
diff --git a/cgit.c b/cgit.c
index 2efa962..e616292 100644
--- a/cgit.c
+++ b/cgit.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "cache.h"
#include "cmd.h"
@@ -475,8 +473,7 @@ static char *find_default_branch(struct cgit_repo *repo)
info.req_ref = repo->defbranch;
info.first_ref = NULL;
info.match = 0;
- refs_for_each_branch_ref(get_main_ref_store(the_repository),
- find_current_ref, &info);
+ for_each_branch_ref(find_current_ref, &info);
if (info.match)
ref = info.req_ref;
else
@@ -493,8 +490,7 @@ static char *guess_defbranch(void)
const char *ref, *refname;
struct object_id oid;
- ref = refs_resolve_ref_unsafe(get_main_ref_store(the_repository),
- "HEAD", 0, &oid, NULL);
+ ref = resolve_ref_unsafe("HEAD", 0, &oid, NULL);
if (!ref || !skip_prefix(ref, "refs/heads/", &refname))
return "master";
return xstrdup(refname);
diff --git a/git b/git
-Subproject 39bf06adf96da25b87c9aa7d35a32ef3683eb4a
+Subproject bea9ecd24b0c3bf06cab4a851694fe09e7e5140
diff --git a/parsing.c b/parsing.c
index 5616d43..dc44ffd 100644
--- a/parsing.c
+++ b/parsing.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
/*
diff --git a/shared.c b/shared.c
index ae3f6c1..26b6ddb 100644
--- a/shared.c
+++ b/shared.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
struct cgit_repolist cgit_repolist;
diff --git a/ui-atom.c b/ui-atom.c
index 0659e96..636cb7e 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-atom.h"
#include "html.h"
diff --git a/ui-blame.c b/ui-blame.c
index d07b67f..e0f0593 100644
--- a/ui-blame.c
+++ b/ui-blame.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-blame.h"
#include "html.h"
diff --git a/ui-blob.c b/ui-blob.c
index e554fe9..08f94ee 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-blob.h"
#include "html.h"
diff --git a/ui-clone.c b/ui-clone.c
index df196a0..5dccb63 100644
--- a/ui-clone.c
+++ b/ui-clone.c
@@ -7,8 +7,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-clone.h"
#include "html.h"
@@ -89,8 +87,7 @@ void cgit_clone_info(void)
ctx.page.mimetype = "text/plain";
ctx.page.filename = "info/refs";
cgit_print_http_headers();
- refs_for_each_ref(get_main_ref_store(the_repository),
- print_ref_info, NULL);
+ for_each_ref(print_ref_info, NULL);
}
void cgit_clone_objects(void)
diff --git a/ui-commit.c b/ui-commit.c
index 972e9bc..30672d0 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-commit.h"
#include "html.h"
diff --git a/ui-diff.c b/ui-diff.c
index a824546..6f42dd4 100644
--- a/ui-diff.c
+++ b/ui-diff.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-diff.h"
#include "html.h"
@@ -426,7 +424,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,
} else if (commit->parents && commit->parents->item) {
oidcpy(old_rev_oid, &commit->parents->item->object.oid);
} else {
- oidclr(old_rev_oid, the_repository->hash_algo);
+ oidclr(old_rev_oid);
}
if (!is_null_oid(old_rev_oid)) {
diff --git a/ui-log.c b/ui-log.c
index ee2a607..50d479d 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-log.h"
#include "html.h"
@@ -82,8 +80,7 @@ void show_commit_decorations(struct commit *commit)
ctx.qry.showmsg, 0);
break;
case DECORATION_REF_TAG:
- if (!refs_read_ref(get_main_ref_store(the_repository), deco->name, &oid_tag) &&
- !peel_iterated_oid(the_repository, &oid_tag, &peeled))
+ if (!read_ref(deco->name, &oid_tag) && !peel_iterated_oid(&oid_tag, &peeled))
is_annotated = !oideq(&oid_tag, &peeled);
cgit_tag_link(buf, NULL, is_annotated ? "tag-annotated-deco" : "tag-deco", buf);
break;
diff --git a/ui-patch.c b/ui-patch.c
index f9d2eeb..3819a81 100644
--- a/ui-patch.c
+++ b/ui-patch.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-patch.h"
#include "html.h"
@@ -59,7 +57,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev,
} else if (commit->parents && commit->parents->item) {
oidcpy(&old_rev_oid, &commit->parents->item->object.oid);
} else {
- oidclr(&old_rev_oid, the_repository->hash_algo);
+ oidclr(&old_rev_oid);
}
if (is_null_oid(&old_rev_oid)) {
diff --git a/ui-plain.c b/ui-plain.c
index 4d69607..a66c5a1 100644
--- a/ui-plain.c
+++ b/ui-plain.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-plain.h"
#include "html.h"
diff --git a/ui-refs.c b/ui-refs.c
index 11fb9fc..456f610 100644
--- a/ui-refs.c
+++ b/ui-refs.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-refs.h"
#include "html.h"
@@ -157,11 +155,9 @@ void cgit_print_branches(int maxcount)
list.refs = NULL;
list.alloc = list.count = 0;
- refs_for_each_branch_ref(get_main_ref_store(the_repository),
- cgit_refs_cb, &list);
+ for_each_branch_ref(cgit_refs_cb, &list);
if (ctx.repo->enable_remote_branches)
- refs_for_each_remote_ref(get_main_ref_store(the_repository),
- cgit_refs_cb, &list);
+ for_each_remote_ref(cgit_refs_cb, &list);
if (maxcount == 0 || maxcount > list.count)
maxcount = list.count;
@@ -186,8 +182,7 @@ void cgit_print_tags(int maxcount)
list.refs = NULL;
list.alloc = list.count = 0;
- refs_for_each_tag_ref(get_main_ref_store(the_repository),
- cgit_refs_cb, &list);
+ for_each_tag_ref(cgit_refs_cb, &list);
if (list.count == 0)
return;
qsort(list.refs, list.count, sizeof(*list.refs), cmp_tag_age);
diff --git a/ui-shared.c b/ui-shared.c
index 6fae72d..d5b5b20 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-shared.h"
#include "cmd.h"
@@ -1043,11 +1041,9 @@ static void print_header(void)
html("<form method='get'>\n");
cgit_add_hidden_formfields(0, 1, ctx.qry.page);
html("<select name='h' onchange='this.form.submit();'>\n");
- refs_for_each_branch_ref(get_main_ref_store(the_repository),
- print_branch_option, ctx.qry.head);
+ for_each_branch_ref(print_branch_option, ctx.qry.head);
if (ctx.repo->enable_remote_branches)
- refs_for_each_remote_ref(get_main_ref_store(the_repository),
- print_branch_option, ctx.qry.head);
+ for_each_remote_ref(print_branch_option, ctx.qry.head);
html("</select> ");
html("<input type='submit' value='switch'/>");
html("</form>");
diff --git a/ui-snapshot.c b/ui-snapshot.c
index 3e38cd5..9f629a9 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-snapshot.h"
#include "html.h"
diff --git a/ui-stats.c b/ui-stats.c
index 02c60ef..1ac67da 100644
--- a/ui-stats.c
+++ b/ui-stats.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-stats.h"
#include "html.h"
diff --git a/ui-tag.c b/ui-tag.c
index 3b11226..5354827 100644
--- a/ui-tag.c
+++ b/ui-tag.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
-#define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-tag.h"
#include "html.h"
diff --git a/ui-tree.c b/ui-tree.c
index 3d8a2eb..0640336 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -6,8 +6,6 @@
* (see COPYING for full license text)
*/
- #define USE_THE_REPOSITORY_VARIABLE
-
#include "cgit.h"
#include "ui-tree.h"
#include "html.h"