From 567078fb6031c99317343859897dbb1efc9f7b09 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Sat, 17 Aug 2019 09:25:36 +0900 Subject: [PATCH] Update git-core to v2.23.0 --- CI/tools.py | 2 +- git-core | 2 +- helper/GIT-VERSION.mk | 2 +- helper/cinnabar-fast-import.c | 3 ++- helper/cinnabar-helper.c | 10 +++++----- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CI/tools.py b/CI/tools.py index 062cbd46..fe4cf6e1 100644 --- a/CI/tools.py +++ b/CI/tools.py @@ -12,7 +12,7 @@ MERCURIAL_VERSION = '5.0' -GIT_VERSION = '2.22.1' +GIT_VERSION = '2.23.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', diff --git a/git-core b/git-core index 75b2f01a..5fa0f523 160000 --- a/git-core +++ b/git-core @@ -1 +1 @@ -Subproject commit 75b2f01a0f642b39b0f29b6218515df9b5eb798e +Subproject commit 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9 diff --git a/helper/GIT-VERSION.mk b/helper/GIT-VERSION.mk index 574544bd..b90def3e 100644 --- a/helper/GIT-VERSION.mk +++ b/helper/GIT-VERSION.mk @@ -1,2 +1,2 @@ -GIT_VERSION ?= v2.22.1 +GIT_VERSION ?= v2.23.0 WINDOWS_GIT_VERSION ?= $(GIT_VERSION).windows.1 diff --git a/helper/cinnabar-fast-import.c b/helper/cinnabar-fast-import.c index 9f3b2143..cadc3db2 100644 --- a/helper/cinnabar-fast-import.c +++ b/helper/cinnabar-fast-import.c @@ -247,7 +247,8 @@ static uintmax_t parse_mark_ref(const char *p, char **endptr) if (path_end) { unsigned short mode; char *path = xstrndup(*endptr, path_end - *endptr); - if (!get_tree_entry(note, path, &git_oid, &mode)) + if (!get_tree_entry(the_repository, note, path, + &git_oid, &mode)) note = &git_oid; else note = &empty_tree; diff --git a/helper/cinnabar-helper.c b/helper/cinnabar-helper.c index 826abed1..65508f4a 100644 --- a/helper/cinnabar-helper.c +++ b/helper/cinnabar-helper.c @@ -1613,7 +1613,7 @@ static void upgrade_manifest_tree_v1(const struct object_id *tree_id, struct oid_map_entry k, *old2new; oidcpy(&k.old_oid, tree_id); - hashmap_entry_init(&k.ent, sha1hash(k.old_oid.hash)); + hashmap_entry_init(&k.ent, oidhash(&k.old_oid)); old2new = hashmap_get(cache, &k, NULL); if (!old2new) { struct strbuf tree_buf = STRBUF_INIT; @@ -1756,7 +1756,7 @@ static void upgrade_manifest(struct commit *commit, struct oid_map_entry k; struct commit *p; oidcpy(&k.old_oid, &commit->parents->item->object.oid); - hashmap_entry_init(&k.ent, sha1hash(k.old_oid.hash)); + hashmap_entry_init(&k.ent, oidhash(&k.old_oid)); entry = hashmap_get(&track->commit_cache, &k, NULL); if (!entry) die("Something went wrong"); @@ -1792,7 +1792,7 @@ static void upgrade_manifest(struct commit *commit, struct oid_map_entry k; if (get_oid_hex(cursor, &k.old_oid)) die("Invalid sha1"); - hashmap_entry_init(&k.ent, sha1hash(k.old_oid.hash)); + hashmap_entry_init(&k.ent, oidhash(&k.old_oid)); entry = hashmap_get(&track->commit_cache, &k, NULL); if (!entry) die("Something went wrong"); @@ -1802,7 +1802,7 @@ static void upgrade_manifest(struct commit *commit, } entry = xmalloc(sizeof(*entry)); - hashmap_entry_init(&entry->ent, sha1hash(commit->object.oid.hash)); + hashmap_entry_init(&entry->ent, oidhash(&commit->object.oid)); oidcpy(&entry->old_oid, &commit->object.oid); store_git_commit(&new_commit, &entry->new_oid); hashmap_add(&track->commit_cache, entry); @@ -1958,7 +1958,7 @@ static void recurse_create_git_tree(const struct object_id *tree_id, { struct oid_map_entry k, *cache_entry; - hashmap_entry_init(&k.ent, sha1hash(tree_id->hash)); + hashmap_entry_init(&k.ent, oidhash(tree_id)); oidcpy(&k.old_oid, tree_id); cache_entry = hashmap_get(cache, &k, NULL); if (!cache_entry) {