remove unused 'repo' argument from got_reflist_insert()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
diff --git a/gotadmin/gotadmin.c b/gotadmin/gotadmin.c
index 928fcd8..9c2f838 100644
--- a/gotadmin/gotadmin.c
+++ b/gotadmin/gotadmin.c
@@ -499,7 +499,7 @@ add_ref(struct got_reflist_entry **new, struct got_reflist_head *refs,
err = got_ref_list(refs, repo, refname,
got_ref_cmp_by_name, NULL);
} else {
- err = got_reflist_insert(new, refs, ref, repo,
+ err = got_reflist_insert(new, refs, ref,
got_ref_cmp_by_name, NULL);
if (err || *new == NULL /* duplicate */)
got_ref_close(ref);
diff --git a/include/got_reference.h b/include/got_reference.h
index 89ec5aa..d242c36 100644
--- a/include/got_reference.h
+++ b/include/got_reference.h
@@ -131,8 +131,7 @@ void got_ref_list_free(struct got_reflist_head *);
*/
const struct got_error *
got_reflist_insert(struct got_reflist_entry **newp, struct got_reflist_head *refs,
- struct got_reference *ref, struct got_repository *repo,
- got_ref_cmp_cb cmp_cb, void *cmp_arg);
+ struct got_reference *ref, got_ref_cmp_cb cmp_cb, void *cmp_arg);
/* Indicate whether the provided reference is symbolic (points at another
* refernce) or not (points at an object ID). */
diff --git a/lib/reference.c b/lib/reference.c
index 1f7e7d1..a326d18 100644
--- a/lib/reference.c
+++ b/lib/reference.c
@@ -810,8 +810,7 @@ done:
const struct got_error *
got_reflist_insert(struct got_reflist_entry **newp, struct got_reflist_head *refs,
- struct got_reference *ref, struct got_repository *repo,
- got_ref_cmp_cb cmp_cb, void *cmp_arg)
+ struct got_reference *ref, got_ref_cmp_cb cmp_cb, void *cmp_arg)
{
const struct got_error *err;
struct got_reflist_entry *new, *re;
@@ -902,7 +901,7 @@ gather_on_disk_refs(struct got_reflist_head *refs, const char *path_refs,
goto done;
if (ref) {
struct got_reflist_entry *new;
- err = got_reflist_insert(&new, refs, ref, repo,
+ err = got_reflist_insert(&new, refs, ref,
cmp_cb, cmp_arg);
if (err || new == NULL /* duplicate */)
got_ref_close(ref);
@@ -953,8 +952,7 @@ got_ref_list(struct got_reflist_head *refs, struct got_repository *repo,
err = open_ref(&ref, path_refs, "", GOT_REF_HEAD, 0);
if (err)
goto done;
- err = got_reflist_insert(&new, refs, ref, repo,
- cmp_cb, cmp_arg);
+ err = got_reflist_insert(&new, refs, ref, cmp_cb, cmp_arg);
if (err || new == NULL /* duplicate */)
got_ref_close(ref);
if (err && err->code != GOT_ERR_NOT_REF)
@@ -973,7 +971,7 @@ got_ref_list(struct got_reflist_head *refs, struct got_repository *repo,
goto done;
/* Try to look up references in a given namespace. */
} else {
- err = got_reflist_insert(&new, refs, ref, repo,
+ err = got_reflist_insert(&new, refs, ref,
cmp_cb, cmp_arg);
if (err || new == NULL /* duplicate */)
got_ref_close(ref);
@@ -1065,7 +1063,7 @@ got_ref_list(struct got_reflist_head *refs, struct got_repository *repo,
continue;
}
}
- err = got_reflist_insert(&new, refs, ref, repo,
+ err = got_reflist_insert(&new, refs, ref,
cmp_cb, cmp_arg);
if (err || new == NULL /* duplicate */)
got_ref_close(ref);
@@ -1316,7 +1314,7 @@ delete_packed_ref(struct got_reference *delref, struct got_repository *repo)
continue;
}
- err = got_reflist_insert(&new, &refs, ref, repo,
+ err = got_reflist_insert(&new, &refs, ref,
got_ref_cmp_by_name, NULL);
if (err || new == NULL /* duplicate */)
got_ref_close(ref);