Skip to content

Commit 73fd187

Browse files
committed
Update git-core to 2.51.0
1 parent 43248cf commit 73fd187

File tree

7 files changed

+35
-28
lines changed

7 files changed

+35
-28
lines changed

CI/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from util import build_commit
1717

1818
MERCURIAL_VERSION = "6.9.1"
19-
GIT_VERSION = "2.50.1"
19+
GIT_VERSION = "2.51.0"
2020

2121
ALL_MERCURIAL_VERSIONS = (
2222
"1.9.3",

git-core

Submodule git-core updated 629 files

src/cinnabar-fast-import.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,9 @@ void do_set_replace(const struct object_id *replaced,
276276
}
277277
}
278278

279-
int write_object_file_flags(const void *buf, size_t len, enum object_type type,
280-
struct object_id *oid, struct object_id *compat_oid_in UNUSED,
281-
unsigned flags UNUSED)
279+
int write_object_file(struct odb_source *source UNUSED, const void *buf, size_t len,
280+
enum object_type type, struct object_id *oid,
281+
struct object_id *compat_oid_in UNUSED, unsigned flags UNUSED)
282282
{
283283
struct strslice data;
284284
data.buf = (void *)buf;

src/cinnabar-helper.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static void init_git_config(void)
225225
static void cleanup_git_config(int nongit)
226226
{
227227
const char *value;
228-
if (!git_config_get_value("cinnabar.fsck", &value)) {
228+
if (!repo_config_get_value(the_repository, "cinnabar.fsck", &value)) {
229229
// We used to set cinnabar.fsck globally, then locally.
230230
// Remove both.
231231
char *user_config, *xdg_config;
@@ -235,23 +235,23 @@ static void cleanup_git_config(int nongit)
235235
xdg_config &&
236236
!access_or_warn(xdg_config, R_OK, 0))
237237
{
238-
git_config_set_in_file_gently(
239-
xdg_config, "cinnabar.fsck", NULL,
240-
NULL);
238+
repo_config_set_in_file_gently(
239+
the_repository, xdg_config,
240+
"cinnabar.fsck", NULL, NULL);
241241
} else {
242-
git_config_set_in_file_gently(
243-
user_config, "cinnabar.fsck", NULL,
244-
NULL);
242+
repo_config_set_in_file_gently(
243+
the_repository, user_config,
244+
"cinnabar.fsck", NULL, NULL);
245245
}
246246
}
247247
free(user_config);
248248
free(xdg_config);
249249
if (!nongit) {
250250
user_config = repo_git_path(the_repository, "config");
251251
if (user_config) {
252-
git_config_set_in_file_gently(
253-
user_config, "cinnabar.fsck", NULL,
254-
NULL);
252+
repo_config_set_in_file_gently(
253+
the_repository, user_config,
254+
"cinnabar.fsck", NULL, NULL);
255255
}
256256
free(user_config);
257257
}
@@ -389,7 +389,7 @@ int init_cinnabar(const char *argv0)
389389

390390
init_git_config();
391391
setup_git_directory_gently(&nongit);
392-
git_config(git_diff_basic_config, NULL);
392+
repo_config(the_repository, git_diff_basic_config, NULL);
393393
cleanup_git_config(nongit);
394394
save_commit_buffer = 0;
395395
warn_on_object_refname_ambiguity = 0;

src/fast-import.c.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
diff --git a/builtin/fast-import.c b/builtin/fast-import.c
2-
index b2839c5f43..1feeaf0ec1 100644
2+
index adf3994be1..bb74f33110 100644
33
--- a/builtin/fast-import.c
44
+++ b/builtin/fast-import.c
5-
@@ -29,6 +29,7 @@
6-
#include "commit-reach.h"
5+
@@ -30,6 +30,7 @@
76
#include "khash.h"
87
#include "date.h"
8+
#include "gpg-interface.h"
99
+#include "shallow.h"
1010

1111
#define PACK_ID_BITS 16
1212
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)
13-
@@ -757,7 +758,7 @@ static struct tree_content *dup_tree_content(struct tree_content *s)
13+
@@ -758,7 +759,7 @@ static struct tree_content *dup_tree_content(struct tree_content *s)
1414
return d;
1515
}
1616

@@ -19,7 +19,7 @@ index b2839c5f43..1feeaf0ec1 100644
1919
{
2020
struct strbuf tmp_file = STRBUF_INIT;
2121
struct packed_git *p;
22-
@@ -860,7 +861,7 @@ static int loosen_small_pack(const struct packed_git *p)
22+
@@ -862,7 +863,7 @@ static int loosen_small_pack(const struct packed_git *p)
2323
return run_command(&unpack);
2424
}
2525

@@ -28,15 +28,15 @@ index b2839c5f43..1feeaf0ec1 100644
2828
{
2929
static int running;
3030

31-
@@ -879,6 +880,7 @@ static void end_packfile(void)
31+
@@ -881,6 +882,7 @@ static void end_packfile(void)
3232

3333
close_pack_windows(pack_data);
3434
finalize_hashfile(pack_file, cur_pack_oid.hash, FSYNC_COMPONENT_PACK, 0);
3535
+ pack_file = NULL;
3636
fixup_pack_header_footer(the_hash_algo, pack_data->pack_fd,
3737
pack_data->hash, pack_data->pack_name,
3838
object_count, cur_pack_oid.hash,
39-
@@ -978,6 +980,9 @@ static int store_object(
39+
@@ -980,6 +982,9 @@ static int store_object(
4040
e->pack_id = MAX_PACK_ID;
4141
e->idx.offset = 1; /* just not zero! */
4242
duplicate_count_by_type[type]++;

src/libgit.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,16 @@ extern "C" {
193193
pub static http_follow_config: http_follow_config;
194194
}
195195

196+
#[allow(non_camel_case_types)]
197+
#[repr(C)]
198+
pub struct object_database([u8; 0]);
199+
196200
#[allow(non_camel_case_types)]
197201
#[repr(C)]
198202
pub struct repository {
199203
gitdir: *const c_char,
200204
commondir: *const c_char,
205+
objects: *mut object_database,
201206
}
202207

203208
#[allow(dead_code, non_camel_case_types, clippy::upper_case_acronyms)]
@@ -247,8 +252,8 @@ impl Default for object_info {
247252
}
248253

249254
extern "C" {
250-
fn oid_object_info_extended(
251-
r: *mut repository,
255+
fn odb_read_object_info_extended(
256+
r: *mut object_database,
252257
oid: *const object_id,
253258
oi: *mut object_info,
254259
flags: c_uint,
@@ -335,7 +340,9 @@ pub fn git_object_info(
335340
info.sizep = &mut len;
336341
info.contentp = &mut buf;
337342
}
338-
(unsafe { oid_object_info_extended(the_repository, &oid.into().into(), &mut info, 0) } == 0)
343+
(unsafe {
344+
odb_read_object_info_extended((*the_repository).objects, &oid.into().into(), &mut info, 0)
345+
} == 0)
339346
.then(|| {
340347
(
341348
t,

src/object-file.c.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ index 1644a0d985..24b821dafd 100644
66
#include "setup.h"
77
#include "streaming.h"
88

9-
+#define write_object_file_flags real_write_object_file_flags
9+
+#define write_object_file real_write_object_file
1010
+
11-
+int real_write_object_file_flags(const void *buf, size_t len,
11+
+int real_write_object_file(struct odb_source *source, const void *buf, size_t len,
1212
+ enum object_type type, struct object_id *oid,
1313
+ struct object_id *compat_oid_in, unsigned flags);
1414
+

0 commit comments

Comments
 (0)