Skip to content

Commit

Permalink
Update git-core to v2.32.0
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Jun 10, 2021
1 parent 1d659d2 commit 1ffb93f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CI/tools.py
Expand Up @@ -12,7 +12,7 @@


MERCURIAL_VERSION = '5.7.1'
GIT_VERSION = '2.31.1'
GIT_VERSION = '2.32.0'

ALL_MERCURIAL_VERSIONS = (
'1.9.3', '2.0.2', '2.1.2', '2.2.3', '2.3.2', '2.4.2', '2.5.4',
Expand Down
2 changes: 1 addition & 1 deletion git-core
Submodule git-core updated 475 files
2 changes: 1 addition & 1 deletion helper/GIT-VERSION.mk
@@ -1,2 +1,2 @@
GIT_VERSION ?= v2.31.1
GIT_VERSION ?= v2.32.0
WINDOWS_GIT_VERSION ?= $(GIT_VERSION).windows.1
5 changes: 3 additions & 2 deletions helper/cinnabar-fast-import.c
Expand Up @@ -106,6 +106,7 @@ void *get_object_entry(const unsigned char *sha1)
{
struct object_id oid;
hashcpy(oid.hash, sha1);
oid.algo = GIT_HASH_SHA1;
return find_object(&oid);
}

Expand Down Expand Up @@ -220,7 +221,7 @@ static void end_packfile()
const struct object_id empty_tree = { {
0x4b, 0x82, 0x5d, 0xc6, 0x42, 0xcb, 0x6e, 0xb9, 0xa0, 0x60,
0xe5, 0x4b, 0xf8, 0xd6, 0x92, 0x88, 0xfb, 0xee, 0x49, 0x04,
} };
}, GIT_HASH_SHA1 };

/* Override fast-import.c's parse_mark_ref to allow a syntax for
* mercurial sha1s, resolved through hg2git. Hack: it uses a fixed
Expand Down Expand Up @@ -1285,7 +1286,7 @@ void store_git_commit(struct strbuf *commit_buf, struct object_id *result)
const struct object_id empty_blob = { {
0xe6, 0x9d, 0xe2, 0x9b, 0xb2, 0xd1, 0xd6, 0x43, 0x4b, 0x8b,
0x29, 0xae, 0x77, 0x5a, 0xd8, 0xc2, 0xe4, 0x8c, 0x53, 0x91,
} };
}, GIT_HASH_SHA1 };

const struct object_id *ensure_empty_blob() {
struct object_entry *oe = find_object((struct object_id *)&empty_blob);
Expand Down
6 changes: 2 additions & 4 deletions helper/cinnabar-helper.c
Expand Up @@ -253,8 +253,7 @@ struct ls_tree_context {
};

static int fill_ls_tree(const struct object_id *oid, struct strbuf *base,
const char *pathname, unsigned mode, int stage,
void *context)
const char *pathname, unsigned mode, void *context)
{
struct ls_tree_context *ctx = context;
struct strbuf *buf = &ctx->buf;
Expand Down Expand Up @@ -299,8 +298,7 @@ static void do_ls_tree(struct string_list *args)
goto not_found;

memset(&match_all, 0, sizeof(match_all));
read_tree_recursive(the_repository, tree, "", 0, 0, &match_all,
fill_ls_tree, &ctx);
read_tree(the_repository, tree, &match_all, fill_ls_tree, &ctx);
send_buffer(&ctx.buf);
strbuf_release(&ctx.buf);

Expand Down
3 changes: 2 additions & 1 deletion helper/cinnabar-notes.c
Expand Up @@ -145,7 +145,8 @@ int cinnabar_remove_note(struct cinnabar_notes_tree *t,
if (!result) {
struct object_id oid;
hashcpy(oid.hash, object_sha1);
add_note(&t->additions, &oid, &null_oid, NULL);
oid.algo = GIT_HASH_SHA1;
add_note(&t->additions, &oid, null_oid(), NULL);
}
return result && result2;
}
Expand Down
4 changes: 2 additions & 2 deletions helper/csum-file.c.patch
@@ -1,5 +1,5 @@
diff --git a/csum-file.c b/csum-file.c
index 0f35fa5ee4..cee7bd5aeb 100644
index 7510950fa3..19d02e3a63 100644
--- a/csum-file.c
+++ b/csum-file.c
@@ -86,7 +86,7 @@ int finalize_hashfile(struct hashfile *f, unsigned char *result, unsigned int fl
Expand All @@ -10,4 +10,4 @@ index 0f35fa5ee4..cee7bd5aeb 100644
+void real_hashwrite(struct hashfile *f, const void *buf, unsigned int count)
{
while (count) {
unsigned offset = f->offset;
unsigned left = sizeof(f->buffer) - f->offset;
2 changes: 2 additions & 0 deletions helper/hg-data.h
Expand Up @@ -43,11 +43,13 @@ static inline void hg_oidcpy2git(struct object_id *dst,
{
memcpy(dst->hash, src->hash, 20);
memset(dst->hash + 20, 0, the_hash_algo->rawsz - 20);
dst->algo = GIT_HASH_SHA1;
}

static inline void oidcpy2hg(struct hg_object_id *dst,
const struct object_id *src)
{
assert(src->algo == GIT_HASH_SHA1);
memcpy(dst->hash, src->hash, 20);
}

Expand Down
4 changes: 2 additions & 2 deletions helper/tree-walk.c.patch
@@ -1,5 +1,5 @@
diff --git a/tree-walk.c b/tree-walk.c
index d5a8e096a6..cace4fd6cf 100644
index 3a94959d64..70558d2964 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -47,7 +47,7 @@ static int decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned l
Expand All @@ -9,5 +9,5 @@ index d5a8e096a6..cace4fd6cf 100644
- desc->entry.mode = canon_mode(mode);
+ desc->entry.mode = mode;
desc->entry.pathlen = len - 1;
hashcpy(desc->entry.oid.hash, (const unsigned char *)path + len);
oidread(&desc->entry.oid, (const unsigned char *)path + len);

0 comments on commit 1ffb93f

Please sign in to comment.