aboutsummaryrefslogtreecommitdiffstats
path: root/ls-refs.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-08-15 13:22:15 -0700
committerJunio C Hamano <gitster@pobox.com>2024-08-15 13:22:15 -0700
commite7f86cb69de9c3b95c8c8816b51621c1d7910e02 (patch)
tree5be466f67f045f9c1ab56411e7977ac5e66a4fe7 /ls-refs.c
parent88457a6151ca7bd46ce1a809f9740340b712e242 (diff)
parenta30ce14a806b6b726ce87fc231a3536e8cc0b0fa (diff)
downloadgit-e7f86cb69de9c3b95c8c8816b51621c1d7910e02.tar.gz
Merge branch 'jc/refs-symref-referent'
The refs API has been taught to give symref target information to the users of ref iterators, allowing for-each-ref and friends to avoid an extra ref_resolve_* API call per a symbolic ref. * jc/refs-symref-referent: ref-filter: populate symref from iterator refs: add referent to each_ref_fn refs: keep track of unresolved reference value in iterators
Diffstat (limited to 'ls-refs.c')
-rw-r--r--ls-refs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ls-refs.c b/ls-refs.c
index 2dd925b43d..c824aea714 100644
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -77,7 +77,7 @@ struct ls_refs_data {
unsigned unborn : 1;
};
-static int send_ref(const char *refname, const struct object_id *oid,
+static int send_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
int flag, void *cb_data)
{
struct ls_refs_data *data = cb_data;
@@ -135,7 +135,7 @@ static void send_possibly_unborn_head(struct ls_refs_data *data)
oid_is_null = is_null_oid(&oid);
if (!oid_is_null ||
(data->unborn && data->symrefs && (flag & REF_ISSYMREF)))
- send_ref(namespaced.buf, oid_is_null ? NULL : &oid, flag, data);
+ send_ref(namespaced.buf, NULL, oid_is_null ? NULL : &oid, flag, data);
strbuf_release(&namespaced);
}