aboutsummaryrefslogtreecommitdiff
path: root/devel/git-cinnabar
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2019-11-05 09:05:59 +0000
committerJan Beich <jbeich@FreeBSD.org>2019-11-05 09:05:59 +0000
commit4bd030d377ba15db9a1c8116a21a306f7dcd03e0 (patch)
treed317f2b04e92b63d45cff48d1f9008634444c73b /devel/git-cinnabar
parent197e3563f2ee552ed2922107b2f5f4f2523c3017 (diff)
downloadports-4bd030d377ba15db9a1c8116a21a306f7dcd03e0.tar.gz
ports-4bd030d377ba15db9a1c8116a21a306f7dcd03e0.zip
devel/git-cinnabar: unbreak after r516646
./helper/cinnabar-helper.c:1609:31: warning: incompatible pointer types passing 'struct oid_map_entry *' to parameter of type 'const struct hashmap_entry *' [-Wincompatible-pointer-types] old2new = hashmap_get(cache, &k, NULL); ^~ ./hashmap.h:306:33: note: passing argument to parameter 'key' here const struct hashmap_entry *key, ^ ./helper/cinnabar-helper.c:1609:10: warning: incompatible pointer types assigning to 'struct oid_map_entry *' from 'struct hashmap_entry *' [-Wincompatible-pointer-types] old2new = hashmap_get(cache, &k, NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./helper/cinnabar-helper.c:1652:22: warning: incompatible pointer types passing 'struct oid_map_entry *' to parameter of type 'struct hashmap_entry *' [-Wincompatible-pointer-types] hashmap_add(cache, old2new); ^~~~~~~ ./hashmap.h:349:61: note: passing argument to parameter 'entry' here void hashmap_add(struct hashmap *map, struct hashmap_entry *entry); ^ ./helper/cinnabar-helper.c:1670:31: warning: incompatible pointer types passing 'struct old2new_manifest_tree *' to parameter of type 'const struct hashmap_entry *' [-Wincompatible-pointer-types] old2new = hashmap_get(cache, &k, NULL); ^~ ./hashmap.h:306:33: note: passing argument to parameter 'key' here const struct hashmap_entry *key, ^ ./helper/cinnabar-helper.c:1670:10: warning: incompatible pointer types assigning to 'struct old2new_manifest_tree *' from 'struct hashmap_entry *' [-Wincompatible-pointer-types] old2new = hashmap_get(cache, &k, NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./helper/cinnabar-helper.c:1715:22: warning: incompatible pointer types passing 'struct old2new_manifest_tree *' to parameter of type 'struct hashmap_entry *' [-Wincompatible-pointer-types] hashmap_add(cache, old2new); ^~~~~~~ ./hashmap.h:349:61: note: passing argument to parameter 'entry' here void hashmap_add(struct hashmap *map, struct hashmap_entry *entry); ^ ./helper/cinnabar-helper.c:1752:45: warning: incompatible pointer types passing 'struct oid_map_entry *' to parameter of type 'const struct hashmap_entry *' [-Wincompatible-pointer-types] entry = hashmap_get(&track->commit_cache, &k, NULL); ^~ ./hashmap.h:306:33: note: passing argument to parameter 'key' here const struct hashmap_entry *key, ^ ./helper/cinnabar-helper.c:1752:9: warning: incompatible pointer types assigning to 'struct oid_map_entry *' from 'struct hashmap_entry *' [-Wincompatible-pointer-types] entry = hashmap_get(&track->commit_cache, &k, NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./helper/cinnabar-helper.c:1788:45: warning: incompatible pointer types passing 'struct oid_map_entry *' to parameter of type 'const struct hashmap_entry *' [-Wincompatible-pointer-types] entry = hashmap_get(&track->commit_cache, &k, NULL); ^~ ./hashmap.h:306:33: note: passing argument to parameter 'key' here const struct hashmap_entry *key, ^ ./helper/cinnabar-helper.c:1788:9: warning: incompatible pointer types assigning to 'struct oid_map_entry *' from 'struct hashmap_entry *' [-Wincompatible-pointer-types] entry = hashmap_get(&track->commit_cache, &k, NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./helper/cinnabar-helper.c:1800:36: warning: incompatible pointer types passing 'struct oid_map_entry *' to parameter of type 'struct hashmap_entry *' [-Wincompatible-pointer-types] hashmap_add(&track->commit_cache, entry); ^~~~~ ./hashmap.h:349:61: note: passing argument to parameter 'entry' here void hashmap_add(struct hashmap *map, struct hashmap_entry *entry); ^ ./helper/cinnabar-helper.c:1904:36: warning: incompatible pointer types passing 'int (const void *, const void *, const void *, const void *)' to parameter of type 'hashmap_cmp_fn' (aka 'int (*)(const void *, const struct hashmap_entry *, const struct hashmap_entry *, const void *)') [-Wincompatible-pointer-types] hashmap_init(&track.tree_cache, oid_map_entry_cmp, NULL, 0); ^~~~~~~~~~~~~~~~~ ./hashmap.h:231:20: note: passing argument to parameter 'equals_function' here hashmap_cmp_fn equals_function, ^ ./helper/cinnabar-helper.c:1906:36: warning: incompatible pointer types passing 'int (const void *, const void *, const void *, const void *)' to parameter of type 'hashmap_cmp_fn' (aka 'int (*)(const void *, const struct hashmap_entry *, const struct hashmap_entry *, const void *)') [-Wincompatible-pointer-types] hashmap_init(&track.tree_cache, old2new_manifest_tree_cmp, NULL, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~ ./hashmap.h:231:20: note: passing argument to parameter 'equals_function' here hashmap_cmp_fn equals_function, ^ ./helper/cinnabar-helper.c:1908:37: warning: incompatible pointer types passing 'int (const void *, const void *, const void *, const void *)' to parameter of type 'hashmap_cmp_fn' (aka 'int (*)(const void *, const struct hashmap_entry *, const struct hashmap_entry *, const void *)') [-Wincompatible-pointer-types] hashmap_init(&track.commit_cache, oid_map_entry_cmp, NULL, 0); ^~~~~~~~~~~~~~~~~ ./hashmap.h:231:20: note: passing argument to parameter 'equals_function' here hashmap_cmp_fn equals_function, ^ ./helper/cinnabar-helper.c:1935:37: error: too many arguments provided to function-like macro invocation hashmap_free(&track.commit_cache, 1); ^ ./hashmap.h:241:9: note: macro 'hashmap_free' defined here #define hashmap_free(map) hashmap_free_(map, -1) ^ ./helper/cinnabar-helper.c:1935:3: error: use of undeclared identifier 'hashmap_free'; did you mean 'hashmap_free_'? hashmap_free(&track.commit_cache, 1); ^~~~~~~~~~~~ hashmap_free_ ./hashmap.h:236:6: note: 'hashmap_free_' declared here void hashmap_free_(struct hashmap *map, ssize_t offset); ^ ./helper/cinnabar-helper.c:1936:35: error: too many arguments provided to function-like macro invocation hashmap_free(&track.tree_cache, 1); ^ ./hashmap.h:241:9: note: macro 'hashmap_free' defined here #define hashmap_free(map) hashmap_free_(map, -1) ^ ./helper/cinnabar-helper.c:1936:3: error: use of undeclared identifier 'hashmap_free'; did you mean 'hashmap_free_'? hashmap_free(&track.tree_cache, 1); ^~~~~~~~~~~~ hashmap_free_ ./hashmap.h:236:6: note: 'hashmap_free_' declared here void hashmap_free_(struct hashmap *map, ssize_t offset); ^ ./helper/cinnabar-helper.c:1935:3: warning: expression result unused [-Wunused-value] hashmap_free(&track.commit_cache, 1); ^~~~~~~~~~~~ ./helper/cinnabar-helper.c:1936:3: warning: expression result unused [-Wunused-value] hashmap_free(&track.tree_cache, 1); ^~~~~~~~~~~~ ./helper/cinnabar-helper.c:1955:35: warning: incompatible pointer types passing 'struct oid_map_entry *' to parameter of type 'const struct hashmap_entry *' [-Wincompatible-pointer-types] cache_entry = hashmap_get(cache, &k, NULL); ^~ ./hashmap.h:306:33: note: passing argument to parameter 'key' here const struct hashmap_entry *key, ^ ./helper/cinnabar-helper.c:1955:14: warning: incompatible pointer types assigning to 'struct oid_map_entry *' from 'struct hashmap_entry *' [-Wincompatible-pointer-types] cache_entry = hashmap_get(cache, &k, NULL); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./helper/cinnabar-helper.c:2020:23: warning: incompatible pointer types passing 'struct oid_map_entry *' to parameter of type 'struct hashmap_entry *' [-Wincompatible-pointer-types] hashmap_add(cache, cache_entry); ^~~~~~~~~~~ ./hashmap.h:349:61: note: passing argument to parameter 'entry' here void hashmap_add(struct hashmap *map, struct hashmap_entry *entry); ^ ./helper/cinnabar-helper.c:2280:32: error: too many arguments provided to function-like macro invocation hashmap_free(&git_tree_cache, 1); ^ ./hashmap.h:241:9: note: macro 'hashmap_free' defined here #define hashmap_free(map) hashmap_free_(map, -1) ^ ./helper/cinnabar-helper.c:2280:2: error: use of undeclared identifier 'hashmap_free'; did you mean 'hashmap_free_'? hashmap_free(&git_tree_cache, 1); ^~~~~~~~~~~~ hashmap_free_ ./hashmap.h:236:6: note: 'hashmap_free_' declared here void hashmap_free_(struct hashmap *map, ssize_t offset); ^ ./helper/cinnabar-helper.c:2281:32: warning: incompatible pointer types passing 'int (const void *, const void *, const void *, const void *)' to parameter of type 'hashmap_cmp_fn' (aka 'int (*)(const void *, const struct hashmap_entry *, const struct hashmap_entry *, const void *)') [-Wincompatible-pointer-types] hashmap_init(&git_tree_cache, oid_map_entry_cmp, NULL, 0); ^~~~~~~~~~~~~~~~~ ./hashmap.h:231:20: note: passing argument to parameter 'equals_function' here hashmap_cmp_fn equals_function, ^ ./helper/cinnabar-helper.c:2280:2: warning: expression result unused [-Wunused-value] hashmap_free(&git_tree_cache, 1); ^~~~~~~~~~~~ ./helper/cinnabar-helper.c:2397:34: warning: incompatible pointer types passing 'int (const void *, const void *, const void *, const void *)' to parameter of type 'hashmap_cmp_fn' (aka 'int (*)(const void *, const struct hashmap_entry *, const struct hashmap_entry *, const void *)') [-Wincompatible-pointer-types] hashmap_init(&git_tree_cache, oid_map_entry_cmp, NULL, 0); ^~~~~~~~~~~~~~~~~ ./hashmap.h:231:20: note: passing argument to parameter 'equals_function' here hashmap_cmp_fn equals_function, ^ ./helper/cinnabar-helper.c:2453:32: error: too many arguments provided to function-like macro invocation hashmap_free(&git_tree_cache, 1); ^ ./hashmap.h:241:9: note: macro 'hashmap_free' defined here #define hashmap_free(map) hashmap_free_(map, -1) ^ ./helper/cinnabar-helper.c:2453:2: error: use of undeclared identifier 'hashmap_free'; did you mean 'hashmap_free_'? hashmap_free(&git_tree_cache, 1); ^~~~~~~~~~~~ hashmap_free_ ./hashmap.h:236:6: note: 'hashmap_free_' declared here void hashmap_free_(struct hashmap *map, ssize_t offset); ^ ./helper/cinnabar-helper.c:2453:2: warning: expression result unused [-Wunused-value] hashmap_free(&git_tree_cache, 1); ^~~~~~~~~~~~ Reported by: pkg-fallout
Notes
Notes: svn path=/head/; revision=516782
Diffstat (limited to 'devel/git-cinnabar')
-rw-r--r--devel/git-cinnabar/Makefile2
-rw-r--r--devel/git-cinnabar/files/patch-git-2.24164
2 files changed, 165 insertions, 1 deletions
diff --git a/devel/git-cinnabar/Makefile b/devel/git-cinnabar/Makefile
index 5ab3e806e38d..175e4ee04a8f 100644
--- a/devel/git-cinnabar/Makefile
+++ b/devel/git-cinnabar/Makefile
@@ -2,7 +2,7 @@
PORTNAME= git-cinnabar
DISTVERSION= 0.5.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel
MAINTAINER= jbeich@FreeBSD.org
diff --git a/devel/git-cinnabar/files/patch-git-2.24 b/devel/git-cinnabar/files/patch-git-2.24
new file mode 100644
index 000000000000..0ac580f8faea
--- /dev/null
+++ b/devel/git-cinnabar/files/patch-git-2.24
@@ -0,0 +1,164 @@
+https://github.com/glandium/git-cinnabar/commit/3a70616bca72
+
+--- helper/GIT-VERSION.mk.orig 2019-07-01 04:57:48 UTC
++++ helper/GIT-VERSION.mk
+@@ -1,2 +1,2 @@
+-GIT_VERSION ?= v2.23.0
++GIT_VERSION ?= v2.24.0
+ WINDOWS_GIT_VERSION ?= $(GIT_VERSION).windows.1
+--- helper/cinnabar-helper.c.orig 2019-07-01 04:57:48 UTC
++++ helper/cinnabar-helper.c
+@@ -1578,21 +1578,25 @@ struct oid_map_entry {
+ struct object_id new_oid;
+ };
+
+-static int old2new_manifest_tree_cmp(const void *cmpdata, const void *e1,
+- const void *e2, const void *keydata)
++static int old2new_manifest_tree_cmp(const void *cmpdata, const struct hashmap_entry *e1,
++ const struct hashmap_entry *e2, const void *keydata)
+ {
+- const struct old2new_manifest_tree *entry1 = e1;
+- const struct old2new_manifest_tree *entry2 = e2;
++ const struct old2new_manifest_tree *entry1 =
++ container_of(e1, const struct old2new_manifest_tree, ent);
++ const struct old2new_manifest_tree *entry2 =
++ container_of(e2, const struct old2new_manifest_tree, ent);
+
+ return memcmp(&entry1->old_tree, &entry2->old_tree,
+ sizeof(struct old_manifest_tree));
+ }
+
+-static int oid_map_entry_cmp(const void *cmpdata, const void *e1,
+- const void *e2, const void *keydata)
++static int oid_map_entry_cmp(const void *cmpdata, const struct hashmap_entry *e1,
++ const struct hashmap_entry *e2, const void *keydata)
+ {
+- const struct oid_map_entry *entry1 = e1;
+- const struct oid_map_entry *entry2 = e2;
++ const struct oid_map_entry *entry1 =
++ container_of(e1, const struct oid_map_entry, ent);
++ const struct oid_map_entry *entry2 =
++ container_of(e2, const struct oid_map_entry, ent);
+
+ return oidcmp(&entry1->old_oid, &entry2->old_oid);
+ }
+@@ -1606,7 +1610,7 @@ static void upgrade_manifest_tree_v1(const struct obje
+
+ oidcpy(&k.old_oid, tree_id);
+ hashmap_entry_init(&k.ent, oidhash(&k.old_oid));
+- old2new = hashmap_get(cache, &k, NULL);
++ old2new = hashmap_get_entry(cache, &k, ent, NULL);
+ if (!old2new) {
+ struct strbuf tree_buf = STRBUF_INIT;
+ struct strbuf entry_buf = STRBUF_INIT;
+@@ -1649,7 +1653,7 @@ static void upgrade_manifest_tree_v1(const struct obje
+ store_git_tree(&tree_buf, reference, &old2new->new_oid);
+ strbuf_release(&tree_buf);
+ strbuf_release(&entry_buf);
+- hashmap_add(cache, old2new);
++ hashmap_add(cache, &old2new->ent);
+
+ free_tree_buffer(tree);
+ if (ref_state.tree)
+@@ -1667,7 +1671,7 @@ static void upgrade_manifest_tree(struct old_manifest_
+
+ hashmap_entry_init(&k.ent, memhash(tree, sizeof(*tree)));
+ k.old_tree = *tree;
+- old2new = hashmap_get(cache, &k, NULL);
++ old2new = hashmap_get_entry(cache, &k, ent, NULL);
+ if (!old2new) {
+ struct old_manifest_tree_state state;
+ struct old_manifest_entry entry;
+@@ -1712,7 +1716,7 @@ static void upgrade_manifest_tree(struct old_manifest_
+ store_git_tree(&tree_buf, reference, &old2new->new_tree);
+ strbuf_release(&tree_buf);
+ strbuf_release(&entry_buf);
+- hashmap_add(cache, old2new);
++ hashmap_add(cache, &old2new->ent);
+
+ free_tree_buffer(state.tree_git);
+ free_tree_buffer(state.tree_hg);
+@@ -1749,7 +1753,7 @@ static void upgrade_manifest(struct commit *commit,
+ struct commit *p;
+ oidcpy(&k.old_oid, &commit->parents->item->object.oid);
+ hashmap_entry_init(&k.ent, oidhash(&k.old_oid));
+- entry = hashmap_get(&track->commit_cache, &k, NULL);
++ entry = hashmap_get_entry(&track->commit_cache, &k, ent, NULL);
+ if (!entry)
+ die("Something went wrong");
+ p = lookup_commit(the_repository, &entry->new_oid);
+@@ -1785,7 +1789,7 @@ static void upgrade_manifest(struct commit *commit,
+ if (get_oid_hex(cursor, &k.old_oid))
+ die("Invalid sha1");
+ hashmap_entry_init(&k.ent, oidhash(&k.old_oid));
+- entry = hashmap_get(&track->commit_cache, &k, NULL);
++ entry = hashmap_get_entry(&track->commit_cache, &k, ent, NULL);
+ if (!entry)
+ die("Something went wrong");
+ oid_to_hex_r(cursor, &entry->new_oid);
+@@ -1797,7 +1801,7 @@ static void upgrade_manifest(struct commit *commit,
+ 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);
++ hashmap_add(&track->commit_cache, &entry->ent);
+ oidset_insert(&track->manifests, &entry->new_oid);
+
+ get_manifest_oid(commit, &oid);
+@@ -1932,8 +1936,8 @@ static void do_upgrade(struct string_list *args)
+ free_tree_buffer(get_commit_tree(manifest_commit));
+ }
+ }
+- hashmap_free(&track.commit_cache, 1);
+- hashmap_free(&track.tree_cache, 1);
++ hashmap_free_entries(&track.commit_cache, struct oid_map_entry, ent);
++ hashmap_free_entries(&track.tree_cache, struct oid_map_entry, ent);
+ oidset_clear(&track.manifests);
+ stop_progress(&track.progress);
+ }
+@@ -1952,7 +1956,7 @@ static void recurse_create_git_tree(const struct objec
+
+ hashmap_entry_init(&k.ent, oidhash(tree_id));
+ oidcpy(&k.old_oid, tree_id);
+- cache_entry = hashmap_get(cache, &k, NULL);
++ cache_entry = hashmap_get_entry(cache, &k, ent, NULL);
+ if (!cache_entry) {
+ struct manifest_tree_state state;
+ struct manifest_tree_state ref_state = { NULL, };
+@@ -2017,7 +2021,7 @@ static void recurse_create_git_tree(const struct objec
+ cache_entry->old_oid = k.old_oid;
+ store_git_tree(tree_buf, reference, &cache_entry->new_oid);
+ strbuf_release(&tree_buf_);
+- hashmap_add(cache, cache_entry);
++ hashmap_add(cache, &cache_entry->ent);
+ }
+
+ if (state.tree)
+@@ -2277,7 +2281,7 @@ static void do_reload(struct string_list *args)
+
+ oidset_clear(&hg2git_seen);
+
+- hashmap_free(&git_tree_cache, 1);
++ hashmap_free_entries(&git_tree_cache, struct oid_map_entry, ent);
+ hashmap_init(&git_tree_cache, oid_map_entry_cmp, NULL, 0);
+
+ oid_array_clear(&manifest_heads);
+@@ -2450,7 +2454,7 @@ int cmd_main(int argc, const char *argv[])
+
+ oidset_clear(&hg2git_seen);
+
+- hashmap_free(&git_tree_cache, 1);
++ hashmap_free_entries(&git_tree_cache, struct oid_map_entry, ent);
+
+ return 0;
+ }
+--- helper/curl-compat.c.orig 2019-07-01 04:57:48 UTC
++++ helper/curl-compat.c
+@@ -6,6 +6,7 @@ void curl_easy_setopt() {}
+ void curl_easy_strerror() {}
+ void curl_global_cleanup() {}
+ void curl_global_init() {}
++void curl_global_init_mem() {}
+ void curl_multi_add_handle() {}
+ void curl_multi_cleanup() {}
+ void curl_multi_fdset() {}