summaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/bisect.c4
-rw-r--r--builtin/checkout.c2
-rw-r--r--builtin/describe.c2
-rw-r--r--builtin/fetch.c3
-rw-r--r--builtin/fsck.c4
-rw-r--r--builtin/gc.c1
-rw-r--r--builtin/name-rev.c2
-rw-r--r--builtin/pack-objects.c5
-rw-r--r--builtin/receive-pack.c2
-rw-r--r--builtin/remote.c4
-rw-r--r--builtin/repack.c1
-rw-r--r--builtin/replace.c1
-rw-r--r--builtin/rev-parse.c4
-rw-r--r--builtin/show-branch.c8
-rw-r--r--builtin/show-ref.c3
-rw-r--r--builtin/submodule--helper.c1
-rw-r--r--builtin/worktree.c1
17 files changed, 30 insertions, 18 deletions
diff --git a/builtin/bisect.c b/builtin/bisect.c
index dabce9b542..453a6cccd7 100644
--- a/builtin/bisect.c
+++ b/builtin/bisect.c
@@ -356,6 +356,7 @@ static int check_and_set_terms(struct bisect_terms *terms, const char *cmd)
}
static int inc_nr(const char *refname UNUSED,
+ const char *referent UNUSED,
const struct object_id *oid UNUSED,
int flag UNUSED, void *cb_data)
{
@@ -545,7 +546,7 @@ finish:
return res;
}
-static int add_bisect_ref(const char *refname, const struct object_id *oid,
+static int add_bisect_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flags UNUSED, void *cb)
{
struct add_bisect_ref_data *data = cb;
@@ -1162,6 +1163,7 @@ static int bisect_visualize(struct bisect_terms *terms, int argc,
}
static int get_first_good(const char *refname UNUSED,
+ const char *referent UNUSED,
const struct object_id *oid,
int flag UNUSED, void *cb_data)
{
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 3cf44b4683..562778885e 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -1045,7 +1045,7 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
report_tracking(new_branch_info);
}
-static int add_pending_uninteresting_ref(const char *refname,
+static int add_pending_uninteresting_ref(const char *refname, const char *referent UNUSED,
const struct object_id *oid,
int flags UNUSED, void *cb_data)
{
diff --git a/builtin/describe.c b/builtin/describe.c
index cf8edc4222..1e86ae6d89 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -149,7 +149,7 @@ static void add_to_known_names(const char *path,
}
}
-static int get_name(const char *path, const struct object_id *oid,
+static int get_name(const char *path, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{
int is_tag = 0;
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 693f02b958..c297569a47 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -286,7 +286,7 @@ static struct refname_hash_entry *refname_hash_add(struct hashmap *map,
return ent;
}
-static int add_one_refname(const char *refname,
+static int add_one_refname(const char *refname, const char *referent UNUSED,
const struct object_id *oid,
int flag UNUSED, void *cbdata)
{
@@ -1464,6 +1464,7 @@ static void set_option(struct transport *transport, const char *name, const char
static int add_oid(const char *refname UNUSED,
+ const char *referent UNUSED,
const struct object_id *oid,
int flags UNUSED, void *cb_data)
{
diff --git a/builtin/fsck.c b/builtin/fsck.c
index d13a226c2e..ef6ee1268b 100644
--- a/builtin/fsck.c
+++ b/builtin/fsck.c
@@ -521,7 +521,7 @@ static int fsck_handle_reflog(const char *logname, void *cb_data)
return 0;
}
-static int fsck_handle_ref(const char *refname, const struct object_id *oid,
+static int fsck_handle_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{
struct object *obj;
@@ -576,7 +576,7 @@ static void get_default_heads(void)
strbuf_worktree_ref(wt, &ref, "HEAD");
fsck_head_link(ref.buf, &head_points_at, &head_oid);
if (head_points_at && !is_null_oid(&head_oid))
- fsck_handle_ref(ref.buf, &head_oid, 0, NULL);
+ fsck_handle_ref(ref.buf, NULL, &head_oid, 0, NULL);
strbuf_release(&ref);
if (include_reflogs)
diff --git a/builtin/gc.c b/builtin/gc.c
index 72bac2554f..65be7c31b3 100644
--- a/builtin/gc.c
+++ b/builtin/gc.c
@@ -836,6 +836,7 @@ struct cg_auto_data {
};
static int dfs_on_ref(const char *refname UNUSED,
+ const char *referent UNUSED,
const struct object_id *oid,
int flags UNUSED,
void *cb_data)
diff --git a/builtin/name-rev.c b/builtin/name-rev.c
index 70e9ec4e47..52016f1cf7 100644
--- a/builtin/name-rev.c
+++ b/builtin/name-rev.c
@@ -337,7 +337,7 @@ static int cmp_by_tag_and_age(const void *a_, const void *b_)
return a->taggerdate != b->taggerdate;
}
-static int name_ref(const char *path, const struct object_id *oid,
+static int name_ref(const char *path, const char *referent UNUSED, const struct object_id *oid,
int flags UNUSED, void *cb_data)
{
struct object *o = parse_object(the_repository, oid);
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index f395488971..c481feadbf 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -771,7 +771,7 @@ static enum write_one_status write_one(struct hashfile *f,
return WRITE_ONE_WRITTEN;
}
-static int mark_tagged(const char *path UNUSED, const struct object_id *oid,
+static int mark_tagged(const char *path UNUSED, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{
struct object_id peeled;
@@ -3129,7 +3129,7 @@ static void add_tag_chain(const struct object_id *oid)
}
}
-static int add_ref_tag(const char *tag UNUSED, const struct object_id *oid,
+static int add_ref_tag(const char *tag UNUSED, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{
struct object_id peeled;
@@ -4076,6 +4076,7 @@ static void record_recent_commit(struct commit *commit, void *data UNUSED)
}
static int mark_bitmap_preferred_tip(const char *refname,
+ const char *referent UNUSED,
const struct object_id *oid,
int flags UNUSED,
void *data UNUSED)
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 339524ae2a..6e0f462efb 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -300,7 +300,7 @@ static void show_ref(const char *path, const struct object_id *oid)
}
}
-static int show_ref_cb(const char *path_full, const struct object_id *oid,
+static int show_ref_cb(const char *path_full, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *data)
{
struct oidset *seen = data;
diff --git a/builtin/remote.c b/builtin/remote.c
index 08292498bd..9a3db1b0f1 100644
--- a/builtin/remote.c
+++ b/builtin/remote.c
@@ -543,6 +543,7 @@ struct branches_for_remote {
};
static int add_branch_for_removal(const char *refname,
+ const char *referent UNUSED,
const struct object_id *oid UNUSED,
int flags UNUSED, void *cb_data)
{
@@ -585,7 +586,7 @@ struct rename_info {
uint32_t symrefs_nr;
};
-static int read_remote_branches(const char *refname,
+static int read_remote_branches(const char *refname, const char *referent UNUSED,
const struct object_id *oid UNUSED,
int flags UNUSED, void *cb_data)
{
@@ -971,6 +972,7 @@ static void free_remote_ref_states(struct ref_states *states)
}
static int append_ref_to_tracked_list(const char *refname,
+ const char *referent UNUSED,
const struct object_id *oid UNUSED,
int flags, void *cb_data)
{
diff --git a/builtin/repack.c b/builtin/repack.c
index f0317fa94a..d9ea6cecbf 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -667,6 +667,7 @@ struct midx_snapshot_ref_data {
};
static int midx_snapshot_ref_one(const char *refname UNUSED,
+ const char *referent UNUSED,
const struct object_id *oid,
int flag UNUSED, void *_data)
{
diff --git a/builtin/replace.c b/builtin/replace.c
index 1ef833c07f..34cc4672bc 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -49,6 +49,7 @@ struct show_data {
};
static int show_reference(const char *refname,
+ const char *referent UNUSED,
const struct object_id *oid,
int flag UNUSED, void *cb_data)
{
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c
index 2e64f5bda7..a7084ca157 100644
--- a/builtin/rev-parse.c
+++ b/builtin/rev-parse.c
@@ -211,7 +211,7 @@ static int show_default(void)
return 0;
}
-static int show_reference(const char *refname, const struct object_id *oid,
+static int show_reference(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{
if (ref_excluded(&ref_excludes, refname))
@@ -220,7 +220,7 @@ static int show_reference(const char *refname, const struct object_id *oid,
return 0;
}
-static int anti_reference(const char *refname, const struct object_id *oid,
+static int anti_reference(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{
show_rev(REVERSED, oid, refname);
diff --git a/builtin/show-branch.c b/builtin/show-branch.c
index d72f4cb98d..3427c1572e 100644
--- a/builtin/show-branch.c
+++ b/builtin/show-branch.c
@@ -410,7 +410,7 @@ static int append_ref(const char *refname, const struct object_id *oid,
return 0;
}
-static int append_head_ref(const char *refname, const struct object_id *oid,
+static int append_head_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{
struct object_id tmp;
@@ -425,7 +425,7 @@ static int append_head_ref(const char *refname, const struct object_id *oid,
return append_ref(refname + ofs, oid, 0);
}
-static int append_remote_ref(const char *refname, const struct object_id *oid,
+static int append_remote_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cb_data UNUSED)
{
struct object_id tmp;
@@ -451,7 +451,7 @@ static int append_tag_ref(const char *refname, const struct object_id *oid,
static const char *match_ref_pattern = NULL;
static int match_ref_slash = 0;
-static int append_matching_ref(const char *refname, const struct object_id *oid,
+static int append_matching_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag, void *cb_data)
{
/* we want to allow pattern hold/<asterisk> to show all
@@ -468,7 +468,7 @@ static int append_matching_ref(const char *refname, const struct object_id *oid,
if (wildmatch(match_ref_pattern, tail, 0))
return 0;
if (starts_with(refname, "refs/heads/"))
- return append_head_ref(refname, oid, flag, cb_data);
+ return append_head_ref(refname, NULL, oid, flag, cb_data);
if (starts_with(refname, "refs/tags/"))
return append_tag_ref(refname, oid, flag, cb_data);
return append_ref(refname, oid, 0);
diff --git a/builtin/show-ref.c b/builtin/show-ref.c
index 839a5c29f3..04e0db707c 100644
--- a/builtin/show-ref.c
+++ b/builtin/show-ref.c
@@ -63,7 +63,7 @@ struct show_ref_data {
int show_head;
};
-static int show_ref(const char *refname, const struct object_id *oid,
+static int show_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag UNUSED, void *cbdata)
{
struct show_ref_data *data = cbdata;
@@ -97,6 +97,7 @@ match:
}
static int add_existing(const char *refname,
+ const char *referent UNUSED,
const struct object_id *oid UNUSED,
int flag UNUSED, void *cbdata)
{
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index f1218a1995..240c5e24ac 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -608,6 +608,7 @@ static void print_status(unsigned int flags, char state, const char *path,
}
static int handle_submodule_head_ref(const char *refname UNUSED,
+ const char *referent UNUSED,
const struct object_id *oid,
int flags UNUSED,
void *cb_data)
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 1d51e54fcd..2e16218c65 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -626,6 +626,7 @@ static void print_preparing_worktree_line(int detach,
* Returns 0 on failure and non-zero on success.
*/
static int first_valid_ref(const char *refname UNUSED,
+ const char *referent UNUSED,
const struct object_id *oid UNUSED,
int flags UNUSED,
void *cb_data UNUSED)