return 0;
}
-static int append_ref(const char *refname, const unsigned char *sha1, int flags, void *cb_data)
+static int append_ref(const char *refname, const struct object_id *oid, int flags, void *cb_data)
{
struct append_ref_cb *cb = (struct append_ref_cb *)(cb_data);
struct ref_list *ref_list = cb->ref_list;
commit = NULL;
if (ref_list->verbose || ref_list->with_commit || merge_filter != NO_FILTER) {
- commit = lookup_commit_reference_gently(sha1, 1);
+ commit = lookup_commit_reference_gently(oid->hash, 1);
if (!commit) {
cb->ret = error(_("branch '%s' does not point at a commit"), refname);
return 0;
int i;
struct append_ref_cb cb;
struct ref_list ref_list;
- struct each_ref_fn_sha1_adapter wrapped_append_ref =
- {append_ref, &cb};
memset(&ref_list, 0, sizeof(ref_list));
ref_list.kinds = kinds;
cb.ref_list = &ref_list;
cb.pattern = pattern;
cb.ret = 0;
- for_each_rawref(each_ref_fn_adapter, &wrapped_append_ref);
+ for_each_rawref(append_ref, &cb);
if (merge_filter != NO_FILTER) {
struct commit *filter;
filter = lookup_commit_reference_gently(merge_filter_ref, 0);