refs: add referent to each_ref_fn
Add a parameter to each_ref_fn so that callers to the ref APIs that use this function as a callback can have acess to the unresolved value of a symbolic ref. Signed-off-by: John Cai <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -156,7 +156,7 @@ static int cmd_rename_ref(struct ref_store *refs, const char **argv)
|
||||
return refs_rename_ref(refs, oldref, newref, logmsg);
|
||||
}
|
||||
|
||||
static int each_ref(const char *refname, const struct object_id *oid,
|
||||
static int each_ref(const char *refname, const char *referent UNUSED, const struct object_id *oid,
|
||||
int flags, void *cb_data UNUSED)
|
||||
{
|
||||
printf("%s %s 0x%x\n", oid_to_hex(oid), refname, flags);
|
||||
|
Reference in New Issue
Block a user