pdfdir = $(docdir)
mandir = $(prefix)/share/man
SHA1_HEADER = <openssl/sha.h>
-GIT_VER = 2.45.2
+GIT_VER = 2.46.0
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
INSTALL = install
COPYTREE = cp -r
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "cache.h"
#include "cmd.h"
info.req_ref = repo->defbranch;
info.first_ref = NULL;
info.match = 0;
- for_each_branch_ref(find_current_ref, &info);
+ refs_for_each_branch_ref(get_main_ref_store(the_repository),
+ find_current_ref, &info);
if (info.match)
ref = info.req_ref;
else
const char *ref, *refname;
struct object_id oid;
- ref = resolve_ref_unsafe("HEAD", 0, &oid, NULL);
+ ref = refs_resolve_ref_unsafe(get_main_ref_store(the_repository),
+ "HEAD", 0, &oid, NULL);
if (!ref || !skip_prefix(ref, "refs/heads/", &refname))
return "master";
return xstrdup(refname);
-Subproject commit bea9ecd24b0c3bf06cab4a851694fe09e7e51408
+Subproject commit 39bf06adf96da25b87c9aa7d35a32ef3683eb4a4
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
/*
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
struct cgit_repolist cgit_repolist;
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-atom.h"
#include "html.h"
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-blame.h"
#include "html.h"
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-blob.h"
#include "html.h"
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-clone.h"
#include "html.h"
ctx.page.mimetype = "text/plain";
ctx.page.filename = "info/refs";
cgit_print_http_headers();
- for_each_ref(print_ref_info, NULL);
+ refs_for_each_ref(get_main_ref_store(the_repository),
+ print_ref_info, NULL);
}
void cgit_clone_objects(void)
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-commit.h"
#include "html.h"
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-diff.h"
#include "html.h"
} else if (commit->parents && commit->parents->item) {
oidcpy(old_rev_oid, &commit->parents->item->object.oid);
} else {
- oidclr(old_rev_oid);
+ oidclr(old_rev_oid, the_repository->hash_algo);
}
if (!is_null_oid(old_rev_oid)) {
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-log.h"
#include "html.h"
ctx.qry.showmsg, 0);
break;
case DECORATION_REF_TAG:
- if (!read_ref(deco->name, &oid_tag) && !peel_iterated_oid(&oid_tag, &peeled))
+ if (!refs_read_ref(get_main_ref_store(the_repository), deco->name, &oid_tag) &&
+ !peel_iterated_oid(the_repository, &oid_tag, &peeled))
is_annotated = !oideq(&oid_tag, &peeled);
cgit_tag_link(buf, NULL, is_annotated ? "tag-annotated-deco" : "tag-deco", buf);
break;
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-patch.h"
#include "html.h"
} else if (commit->parents && commit->parents->item) {
oidcpy(&old_rev_oid, &commit->parents->item->object.oid);
} else {
- oidclr(&old_rev_oid);
+ oidclr(&old_rev_oid, the_repository->hash_algo);
}
if (is_null_oid(&old_rev_oid)) {
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-plain.h"
#include "html.h"
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-refs.h"
#include "html.h"
list.refs = NULL;
list.alloc = list.count = 0;
- for_each_branch_ref(cgit_refs_cb, &list);
+ refs_for_each_branch_ref(get_main_ref_store(the_repository),
+ cgit_refs_cb, &list);
if (ctx.repo->enable_remote_branches)
- for_each_remote_ref(cgit_refs_cb, &list);
+ refs_for_each_remote_ref(get_main_ref_store(the_repository),
+ cgit_refs_cb, &list);
if (maxcount == 0 || maxcount > list.count)
maxcount = list.count;
list.refs = NULL;
list.alloc = list.count = 0;
- for_each_tag_ref(cgit_refs_cb, &list);
+ refs_for_each_tag_ref(get_main_ref_store(the_repository),
+ cgit_refs_cb, &list);
if (list.count == 0)
return;
qsort(list.refs, list.count, sizeof(*list.refs), cmp_tag_age);
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-shared.h"
#include "cmd.h"
html("<form method='get'>\n");
cgit_add_hidden_formfields(0, 1, ctx.qry.page);
html("<select name='h' onchange='this.form.submit();'>\n");
- for_each_branch_ref(print_branch_option, ctx.qry.head);
+ refs_for_each_branch_ref(get_main_ref_store(the_repository),
+ print_branch_option, ctx.qry.head);
if (ctx.repo->enable_remote_branches)
- for_each_remote_ref(print_branch_option, ctx.qry.head);
+ refs_for_each_remote_ref(get_main_ref_store(the_repository),
+ print_branch_option, ctx.qry.head);
html("</select> ");
html("<input type='submit' value='switch'/>");
html("</form>");
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-snapshot.h"
#include "html.h"
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-stats.h"
#include "html.h"
* (see COPYING for full license text)
*/
+#define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-tag.h"
#include "html.h"
* (see COPYING for full license text)
*/
+ #define USE_THE_REPOSITORY_VARIABLE
+
#include "cgit.h"
#include "ui-tree.h"
#include "html.h"