};
static int add_branch_for_removal(const char *refname,
- const unsigned char *sha1, int flags, void *cb_data)
+ const struct object_id *oid, int flags, void *cb_data)
{
struct branches_for_remote *branches = cb_data;
struct refspec refspec;
item = string_list_append(branches->branches, refname);
item->util = xmalloc(20);
- hashcpy(item->util, sha1);
+ hashcpy(item->util, oid->hash);
return 0;
}
struct string_list skipped = STRING_LIST_INIT_DUP;
struct branches_for_remote cb_data;
int i, result;
- struct each_ref_fn_sha1_adapter wrapped_add_branch_for_removal =
- {add_branch_for_removal, &cb_data};
memset(&cb_data, 0, sizeof(cb_data));
cb_data.branches = &branches;
* refs, which are invalidated when deleting a branch.
*/
cb_data.remote = remote;
- result = for_each_ref(each_ref_fn_adapter, &wrapped_add_branch_for_removal);
+ result = for_each_ref(add_branch_for_removal, &cb_data);
strbuf_release(&buf);
if (!result)