diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2019-02-25 14:24:18 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2019-02-25 14:24:18 +0000 |
commit | 6ea2f4552128ecb6a44067b3a5058f6e0f1e1093 (patch) | |
tree | 5a474d7cab2d4d78f3a8b466749b855cd30c9e30 /devel | |
parent | benchmarks/phoronix-test-suite: Update to 8.6.1 (diff) |
devel/git-cinnabar: rebuild and unbreak after r493857
API bustage was caused by:
https://github.com/git/git/commit/a3b72c89bdd1
https://github.com/git/git/commit/e092073d643b
https://github.com/git/git/commit/ea82b2a0857e
Notes
Notes:
svn path=/head/; revision=493866
Diffstat (limited to 'devel')
-rw-r--r-- | devel/git-cinnabar/Makefile | 1 | ||||
-rw-r--r-- | devel/git-cinnabar/files/patch-helper_cinnabar-fast-import.c | 33 | ||||
-rw-r--r-- | devel/git-cinnabar/files/patch-helper_cinnabar-helper.c | 276 | ||||
-rw-r--r-- | devel/git-cinnabar/files/patch-helper_hg-data.c | 33 | ||||
-rw-r--r-- | devel/git-cinnabar/files/patch-helper_tree-walk.c.patch | 29 |
5 files changed, 372 insertions, 0 deletions
diff --git a/devel/git-cinnabar/Makefile b/devel/git-cinnabar/Makefile index b97cf0cf80e5..a0b6587813a0 100644 --- a/devel/git-cinnabar/Makefile +++ b/devel/git-cinnabar/Makefile @@ -3,6 +3,7 @@ PORTNAME= git-cinnabar DISTVERSION= 0.5.0-36 DISTVERSIONSUFFIX= -g0236515 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= jbeich@FreeBSD.org diff --git a/devel/git-cinnabar/files/patch-helper_cinnabar-fast-import.c b/devel/git-cinnabar/files/patch-helper_cinnabar-fast-import.c new file mode 100644 index 000000000000..162e506b248b --- /dev/null +++ b/devel/git-cinnabar/files/patch-helper_cinnabar-fast-import.c @@ -0,0 +1,33 @@ +../helper/cinnabar-fast-import.c:422:65: error: too few arguments to function call, expected 5, have 4 + char *content = read_object_file_extended(note, &type, &len, 0); + ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ +./object-store.h:165:1: note: 'read_object_file_extended' declared here +extern void *read_object_file_extended(struct repository *r, +^ +../helper/cinnabar-fast-import.c:435:47: error: too few arguments to function call, expected 5, have 4 + &len, 0); + ^ +./object-store.h:165:1: note: 'read_object_file_extended' declared here +extern void *read_object_file_extended(struct repository *r, +^ + +--- helper/cinnabar-fast-import.c.orig 2018-12-26 23:01:43 UTC ++++ helper/cinnabar-fast-import.c +@@ -419,7 +419,7 @@ static void handle_changeset_conflict(struct object_id + struct object_id oid; + enum object_type type; + unsigned long len; +- char *content = read_object_file_extended(note, &type, &len, 0); ++ char *content = read_object_file_extended(the_repository, note, &type, &len, 0); + if (len < 50 || !starts_with(content, "changeset ") || + get_oid_hex(&content[10], &oid)) + die("Invalid git2hg note for %s", oid_to_hex(git_id)); +@@ -431,7 +431,7 @@ static void handle_changeset_conflict(struct object_id + break; + + if (!buf.len) { +- content = read_object_file_extended(git_id, &type, ++ content = read_object_file_extended(the_repository, git_id, &type, + &len, 0); + strbuf_add(&buf, content, len); + free(content); diff --git a/devel/git-cinnabar/files/patch-helper_cinnabar-helper.c b/devel/git-cinnabar/files/patch-helper_cinnabar-helper.c new file mode 100644 index 000000000000..5b86cb2dd29f --- /dev/null +++ b/devel/git-cinnabar/files/patch-helper_cinnabar-helper.c @@ -0,0 +1,276 @@ +../helper/cinnabar-helper.c:585:23: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + oidcpy(&result->git, entry.oid); + ^~~~~~~~~ + & +./cache.h:1075:74: note: passing argument to parameter 'src' here +static inline void oidcpy(struct object_id *dst, const struct object_id *src) + ^ +../helper/cinnabar-helper.c:592:22: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + oidcpy(&result->hg, entry.oid); + ^~~~~~~~~ + & +./cache.h:1075:74: note: passing argument to parameter 'src' here +static inline void oidcpy(struct object_id *dst, const struct object_id *src) + ^ +../helper/cinnabar-helper.c:670:14: error: assigning to 'const struct object_id *' from incompatible type + 'struct object_id'; take the address with & + result->oid = entry_hg.oid; + ^ ~~~~~~~~~~~~ + & +../helper/cinnabar-helper.c:679:20: error: assigning to 'const struct object_id *' from incompatible type + 'struct object_id'; take the address with & + result->other_oid = entry_git.oid; + ^ ~~~~~~~~~~~~~ + & +../helper/cinnabar-helper.c:707:21: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + recurse_manifest(entry.oid, manifest, + ^~~~~~~~~ + & +../helper/cinnabar-helper.c:685:54: note: passing argument to parameter 'tree_id' here +static void recurse_manifest(const struct object_id *tree_id, + ^ +../helper/cinnabar-helper.c:716:26: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + oid_to_hex(entry.oid), hgattr(entry.mode)); + ^~~~~~~~~ + & +./cache.h:1405:42: note: passing argument to parameter 'oid' here +char *oid_to_hex(const struct object_id *oid); /* same static buffer */ + ^ +../helper/cinnabar-helper.c:729:43: error: passing 'const struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + return (e1->mode == e2->mode) && (oidcmp(e1->oid, e2->oid) == 0); + ^~~~~~~ + & +./cache.h:1039:50: note: passing argument to parameter 'oid1' here +static inline int oidcmp(const struct object_id *oid1, const struct object_id *oid2) + ^ +../helper/cinnabar-helper.c:829:27: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + oid_to_hex(cur_entry.oid), + ^~~~~~~~~~~~~ + & +./cache.h:1405:42: note: passing argument to parameter 'oid' here +char *oid_to_hex(const struct object_id *oid); /* same static buffer */ + ^ +../helper/cinnabar-helper.c:839:22: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + recurse_manifest2(ref_entry.oid, ref_manifest, + ^~~~~~~~~~~~~ + & +../helper/cinnabar-helper.c:747:55: note: passing argument to parameter 'ref_tree_id' here +static void recurse_manifest2(const struct object_id *ref_tree_id, + ^ +../helper/cinnabar-helper.c:843:21: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + recurse_manifest(cur_entry.oid, manifest, + ^~~~~~~~~~~~~ + & +../helper/cinnabar-helper.c:685:54: note: passing argument to parameter 'tree_id' here +static void recurse_manifest(const struct object_id *tree_id, + ^ +../helper/cinnabar-helper.c:1452:57: error: too few arguments to function call, expected 5, have 4 + content = read_object_file_extended(note, &t, &len, 0); + ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ +./object-store.h:165:1: note: 'read_object_file_extended' declared here +extern void *read_object_file_extended(struct repository *r, +^ +../helper/cinnabar-helper.c:1577:16: error: non-pointer operand type 'struct object_id' incompatible with NULL + ref_entry ? ref_entry->oid : NULL, + ^ ~~~~~~~~~~~~~~ +../helper/cinnabar-helper.c:1581:36: error: member reference type 'struct object_id' is not a pointer; did you + mean to use '.'? + strbuf_add(&tree_buf, entry.oid->hash, 20); + ~~~~~~~~~^~ + . +../helper/cinnabar-helper.c:1636:16: error: non-pointer operand type 'struct object_id' incompatible with NULL + ref_entry ? ref_entry->oid : NULL, + ^ ~~~~~~~~~~~~~~ +../helper/cinnabar-helper.c:1918:6: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + entry.oid, NULL, tree_buf, NULL, + ^~~~~~~~~ + & +../helper/cinnabar-helper.c:1883:61: note: passing argument to parameter 'tree_id' here +static void recurse_create_git_tree(const struct object_id *tree_id, + ^ +../helper/cinnabar-helper.c:1927:16: error: non-pointer operand type 'struct object_id' incompatible with NULL + ref_entry ? ref_entry->oid : NULL, + ^ ~~~~~~~~~~~~~~ +../helper/cinnabar-helper.c:1931:35: error: member reference type 'struct object_id' is not a pointer; did you + mean to use '.'? + if (is_empty_hg_file(entry.oid->hash)) + ~~~~~~~~~^~ + . +../helper/cinnabar-helper.c:1934:32: error: passing 'struct object_id' to parameter of incompatible type + 'const struct object_id *'; take the address with & + file_oid = resolve_hg2git(entry.oid, 40); + ^~~~~~~~~ + & +../helper/cinnabar-helper.c:470:71: note: passing argument to parameter 'oid' here +static const struct object_id *resolve_hg2git(const struct object_id *oid, + ^ + +--- helper/cinnabar-helper.c.orig 2019-02-25 13:51:46 UTC ++++ helper/cinnabar-helper.c +@@ -282,7 +282,7 @@ static void do_ls_tree(struct string_list *args) + goto not_found; + + memset(&match_all, 0, sizeof(match_all)); +- read_tree_recursive(tree, "", 0, 0, &match_all, fill_ls_tree, &ctx); ++ read_tree_recursive(the_repository, tree, "", 0, 0, &match_all, fill_ls_tree, &ctx); + send_buffer(&ctx.buf); + strbuf_release(&ctx.buf); + +@@ -582,14 +582,14 @@ static int get_old_manifest_tree(struct tree *tree, + goto not_found; + if (strcmp(entry.path, "git")) + goto not_found; +- oidcpy(&result->git, entry.oid); ++ oidcpy(&result->git, &entry.oid); + + /* The second entry in the manifest tree is the hg subtree. */ + if (!tree_entry(&desc, &entry)) + goto not_found; + if (strcmp(entry.path, "hg")) + goto not_found; +- oidcpy(&result->hg, entry.oid); ++ oidcpy(&result->hg, &entry.oid); + + /* There shouldn't be any other entry. */ + if (tree_entry(&desc, &entry)) +@@ -667,7 +667,7 @@ static int old_manifest_tree_entry(struct old_manifest + return 0; + } + +- result->oid = entry_hg.oid; ++ result->oid = &entry_hg.oid; + result->path = entry_hg.path; + result->mode = entry_git.mode; + if (strcmp(entry_hg.path, entry_git.path)) +@@ -676,7 +676,7 @@ static int old_manifest_tree_entry(struct old_manifest + if (entry_git.mode != entry_hg.mode) + goto corrupted; + } +- result->other_oid = entry_git.oid; ++ result->other_oid = &entry_git.oid; + return 1; + corrupted: + die("Corrupted metadata"); +@@ -704,7 +704,7 @@ static void recurse_manifest(const struct object_id *t + strbuf_addslice(&dir, base); + strbuf_addslice(&dir, entry_path); + strbuf_addch(&dir, '/'); +- recurse_manifest(entry.oid, manifest, ++ recurse_manifest(&entry.oid, manifest, + strbuf_as_slice(&dir), tree_list); + strbuf_release(&dir); + continue; +@@ -713,7 +713,7 @@ static void recurse_manifest(const struct object_id *t + strbuf_addslice(manifest, base); + strbuf_addslice(manifest, entry_path); + strbuf_addf(manifest, "%c%s%s\n", '\0', +- oid_to_hex(entry.oid), hgattr(entry.mode)); ++ oid_to_hex(&entry.oid), hgattr(entry.mode)); + } + + return; +@@ -726,7 +726,7 @@ corrupted: + static int manifest_entry_equal(const struct name_entry *e1, + const struct name_entry *e2) + { +- return (e1->mode == e2->mode) && (oidcmp(e1->oid, e2->oid) == 0); ++ return (e1->mode == e2->mode) && (oidcmp(&e1->oid, &e2->oid) == 0); + } + + /* Return whether base + name matches path */ +@@ -826,7 +826,7 @@ static void recurse_manifest2(const struct object_id * + strbuf_addslice(manifest, strslice_slice( + cur_entry_path, 1, SIZE_MAX)); + strbuf_addf(manifest, "%c%s%s\n", '\0', +- oid_to_hex(cur_entry.oid), ++ oid_to_hex(&cur_entry.oid), + hgattr(cur_entry.mode)); + continue; + } +@@ -836,11 +836,11 @@ static void recurse_manifest2(const struct object_id * + cur_entry_path, 1, SIZE_MAX)); + strbuf_addch(&dir, '/'); + if (cmp == 0 && S_ISDIR(ref_entry.mode)) { +- recurse_manifest2(ref_entry.oid, ref_manifest, +- cur_entry.oid, manifest, ++ recurse_manifest2(&ref_entry.oid, ref_manifest, ++ &cur_entry.oid, manifest, + strbuf_as_slice(&dir), tree_list); + } else +- recurse_manifest(cur_entry.oid, manifest, ++ recurse_manifest(&cur_entry.oid, manifest, + strbuf_as_slice(&dir), tree_list); + strbuf_release(&dir); + } +@@ -1449,7 +1449,7 @@ static void upgrade_files(const struct old_manifest_tr + unsigned long len; + enum object_type t; + char *content; +- content = read_object_file_extended(note, &t, &len, 0); ++ content = read_object_file_extended(the_repository, note, &t, &len, 0); + strbuf_attach(&buf, content, len, len); + hg_file_init(&file); + hg_file_from_memory(&file, entry.oid->hash, &buf); +@@ -1573,12 +1573,12 @@ static void upgrade_manifest_tree_v1(const struct obje + &ref_state, reference, entry_buf.buf); + strbuf_reset(&entry_buf); + upgrade_manifest_tree_v1( +- entry.oid, +- ref_entry ? ref_entry->oid : NULL, ++ &entry.oid, ++ ref_entry ? &ref_entry->oid : NULL, + &new_subtree, cache); + strbuf_add(&tree_buf, new_subtree.hash, 20); + } else { +- strbuf_add(&tree_buf, entry.oid->hash, 20); ++ strbuf_add(&tree_buf, entry.oid.hash, 20); + } + } + +@@ -1633,7 +1633,7 @@ static void upgrade_manifest_tree(struct old_manifest_ + oidcpy(&subtree.hg, entry.oid); + upgrade_manifest_tree( + &subtree, +- ref_entry ? ref_entry->oid : NULL, ++ ref_entry ? &ref_entry->oid : NULL, + &oid, cache); + } else { + if (S_ISLNK(mode)) +@@ -1915,7 +1915,7 @@ static void recurse_create_git_tree(const struct objec + if (!S_ISDIR(mode)) + goto corrupted; + recurse_create_git_tree( +- entry.oid, NULL, tree_buf, NULL, ++ &entry.oid, NULL, tree_buf, NULL, + cache); + continue; + } else if (S_ISDIR(mode)) { +@@ -1923,15 +1923,15 @@ static void recurse_create_git_tree(const struct objec + ref_entry = lazy_tree_entry_by_name( + &ref_state, reference, entry_path.buf); + recurse_create_git_tree( +- entry.oid, +- ref_entry ? ref_entry->oid : NULL, ++ &entry.oid, ++ ref_entry ? &ref_entry->oid : NULL, + NULL, &oid, cache); + } else { + const struct object_id *file_oid; +- if (is_empty_hg_file(entry.oid->hash)) ++ if (is_empty_hg_file(entry.oid.hash)) + file_oid = ensure_empty_blob(); + else +- file_oid = resolve_hg2git(entry.oid, 40); ++ file_oid = resolve_hg2git(&entry.oid, 40); + if (!file_oid) + goto corrupted; + oidcpy(&oid, file_oid); diff --git a/devel/git-cinnabar/files/patch-helper_hg-data.c b/devel/git-cinnabar/files/patch-helper_hg-data.c new file mode 100644 index 000000000000..a25c1e63f729 --- /dev/null +++ b/devel/git-cinnabar/files/patch-helper_hg-data.c @@ -0,0 +1,33 @@ +../helper/hg-data.c:44:59: error: too few arguments to function call, expected 5, have 4 + content = read_object_file_extended(note, &type, &len, 0); + ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ +./object-store.h:165:1: note: 'read_object_file_extended' declared here +extern void *read_object_file_extended(struct repository *r, +^ +../helper/hg-data.c:58:58: error: too few arguments to function call, expected 5, have 4 + content = read_object_file_extended(note, &type, &len, 0); + ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ +./object-store.h:165:1: note: 'read_object_file_extended' declared here +extern void *read_object_file_extended(struct repository *r, +^ + +--- helper/hg-data.c.orig 2018-12-26 23:01:43 UTC ++++ helper/hg-data.c +@@ -41,7 +41,7 @@ void hg_file_load(struct hg_file *result, const unsign + ensure_notes(&files_meta); + note = get_note(&files_meta, &oid); + if (note) { +- content = read_object_file_extended(note, &type, &len, 0); ++ content = read_object_file_extended(the_repository, note, &type, &len, 0); + strbuf_add(&result->file, "\1\n", 2); + strbuf_add(&result->file, content, len); + strbuf_add(&result->file, "\1\n", 2); +@@ -55,7 +55,7 @@ void hg_file_load(struct hg_file *result, const unsign + if (!note) + die("Missing data"); + +- content = read_object_file_extended(note, &type, &len, 0); ++ content = read_object_file_extended(the_repository, note, &type, &len, 0); + strbuf_add(&result->file, content, len); + free(content); + diff --git a/devel/git-cinnabar/files/patch-helper_tree-walk.c.patch b/devel/git-cinnabar/files/patch-helper_tree-walk.c.patch new file mode 100644 index 000000000000..a54dbf351264 --- /dev/null +++ b/devel/git-cinnabar/files/patch-helper_tree-walk.c.patch @@ -0,0 +1,29 @@ +-------------------------- +|diff --git a/tree-walk.c b/tree-walk.c +|index 8f5090862b..b24d5b0d99 100644 +|--- a/tree-walk.c +|+++ b/tree-walk.c +-------------------------- +Patching file git-core/tree-walk.c using Plan A... +Hunk #1 failed at 45. +Hmm... Looks like a unified diff to me... +1 out of 1 hunks failed--saving rejects to helper/tree-walk.patched.c.rej + +--- helper/tree-walk.c.patch.orig 2018-12-26 23:01:43 UTC ++++ helper/tree-walk.c.patch +@@ -2,12 +2,12 @@ diff --git a/tree-walk.c b/tree-walk.c + index 8f5090862b..b24d5b0d99 100644 + --- a/tree-walk.c + +++ b/tree-walk.c +-@@ -45,7 +45,7 @@ static int decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned l ++@@ -47,7 +47,7 @@ static int decode_tree_entry(struct tree_desc *desc, c + + /* Initialize the descriptor entry */ + desc->entry.path = path; + - desc->entry.mode = canon_mode(mode); + + desc->entry.mode = mode; +- desc->entry.oid = (const struct object_id *)(path + len); ++ desc->entry.pathlen = len - 1; ++ hashcpy(desc->entry.oid.hash, (const unsigned char *)path + len); + +- return 0; |