Skip to content

Commit 09d24d7

Browse files
eworm-dezx2c4
authored andcommitted
git: update to v2.46.0
Update to git version v2.46.0, this requires changes for these upstream commits: * e7da9385708accf518a80a1e17969020fb361048 global: introduce `USE_THE_REPOSITORY_VARIABLE` macro * 9da95bda74cf10e1475384a71fd20914c3b99784 hash: require hash algorithm in `oidread()` and `oidclr()` * 30aaff437fddd889ba429b50b96ea4c151c502c5 refs: pass repo when peeling objects * c8f815c2083c4b340d4148a15d45c55f2fcc7d3f refs: remove functions without ref store Signed-off-by: Christian Hesse <[email protected]>
1 parent fb87de7 commit 09d24d7

20 files changed

+58
-13
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ htmldir = $(docdir)
1414
pdfdir = $(docdir)
1515
mandir = $(prefix)/share/man
1616
SHA1_HEADER = <openssl/sha.h>
17-
GIT_VER = 2.45.2
17+
GIT_VER = 2.46.0
1818
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
1919
INSTALL = install
2020
COPYTREE = cp -r

cgit.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* (see COPYING for full license text)
77
*/
88

9+
#define USE_THE_REPOSITORY_VARIABLE
10+
911
#include "cgit.h"
1012
#include "cache.h"
1113
#include "cmd.h"
@@ -473,7 +475,8 @@ static char *find_default_branch(struct cgit_repo *repo)
473475
info.req_ref = repo->defbranch;
474476
info.first_ref = NULL;
475477
info.match = 0;
476-
for_each_branch_ref(find_current_ref, &info);
478+
refs_for_each_branch_ref(get_main_ref_store(the_repository),
479+
find_current_ref, &info);
477480
if (info.match)
478481
ref = info.req_ref;
479482
else
@@ -490,7 +493,8 @@ static char *guess_defbranch(void)
490493
const char *ref, *refname;
491494
struct object_id oid;
492495

493-
ref = resolve_ref_unsafe("HEAD", 0, &oid, NULL);
496+
ref = refs_resolve_ref_unsafe(get_main_ref_store(the_repository),
497+
"HEAD", 0, &oid, NULL);
494498
if (!ref || !skip_prefix(ref, "refs/heads/", &refname))
495499
return "master";
496500
return xstrdup(refname);

git

Submodule git updated from bea9ecd to 39bf06a

parsing.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* (see COPYING for full license text)
77
*/
88

9+
#define USE_THE_REPOSITORY_VARIABLE
10+
911
#include "cgit.h"
1012

1113
/*

shared.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* (see COPYING for full license text)
77
*/
88

9+
#define USE_THE_REPOSITORY_VARIABLE
10+
911
#include "cgit.h"
1012

1113
struct cgit_repolist cgit_repolist;

ui-atom.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* (see COPYING for full license text)
77
*/
88

9+
#define USE_THE_REPOSITORY_VARIABLE
10+
911
#include "cgit.h"
1012
#include "ui-atom.h"
1113
#include "html.h"

ui-blame.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* (see COPYING for full license text)
77
*/
88

9+
#define USE_THE_REPOSITORY_VARIABLE
10+
911
#include "cgit.h"
1012
#include "ui-blame.h"
1113
#include "html.h"

ui-blob.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* (see COPYING for full license text)
77
*/
88

9+
#define USE_THE_REPOSITORY_VARIABLE
10+
911
#include "cgit.h"
1012
#include "ui-blob.h"
1113
#include "html.h"

ui-clone.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* (see COPYING for full license text)
88
*/
99

10+
#define USE_THE_REPOSITORY_VARIABLE
11+
1012
#include "cgit.h"
1113
#include "ui-clone.h"
1214
#include "html.h"
@@ -87,7 +89,8 @@ void cgit_clone_info(void)
8789
ctx.page.mimetype = "text/plain";
8890
ctx.page.filename = "info/refs";
8991
cgit_print_http_headers();
90-
for_each_ref(print_ref_info, NULL);
92+
refs_for_each_ref(get_main_ref_store(the_repository),
93+
print_ref_info, NULL);
9194
}
9295

9396
void cgit_clone_objects(void)

ui-commit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* (see COPYING for full license text)
77
*/
88

9+
#define USE_THE_REPOSITORY_VARIABLE
10+
911
#include "cgit.h"
1012
#include "ui-commit.h"
1113
#include "html.h"

0 commit comments

Comments
 (0)