return 0;
}
-static int handle_one_ref(const char *path, const unsigned char *sha1, int flag, void *cb_data)
+static int handle_one_ref(const char *path, const struct object_id *oid,
+ int flag, void *cb_data)
{
struct all_refs_cb *cb = cb_data;
struct object *object;
if (ref_excluded(cb->all_revs->ref_excludes, path))
return 0;
- object = get_reference(cb->all_revs, path, sha1, cb->all_flags);
+ object = get_reference(cb->all_revs, path, oid->hash, cb->all_flags);
add_rev_cmdline(cb->all_revs, object, path, REV_CMD_REF, cb->all_flags);
- add_pending_sha1(cb->all_revs, path, sha1, cb->all_flags);
+ add_pending_sha1(cb->all_revs, path, oid->hash, cb->all_flags);
return 0;
}
void add_reflogs_to_pending(struct rev_info *revs, unsigned flags)
{
struct all_refs_cb cb;
+ struct each_ref_fn_sha1_adapter wrapped_handle_one_reflog =
+ {handle_one_reflog, &cb};
+
cb.all_revs = revs;
cb.all_flags = flags;
- for_each_reflog(handle_one_reflog, &cb);
+ for_each_reflog(each_ref_fn_adapter, &wrapped_handle_one_reflog);
}
static void add_cache_tree(struct cache_tree *it, struct rev_info *revs,