提交 eed25148 编写于 作者: M Michael Haggerty 提交者: Junio C Hamano

register_ref(): rewrite to take an object_id argument

Signed-off-by: NMichael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Nbrian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 a217dcbd
......@@ -400,16 +400,16 @@ struct commit_list *find_bisection(struct commit_list *list,
return best;
}
static int register_ref(const char *refname, const unsigned char *sha1,
static int register_ref(const char *refname, const struct object_id *oid,
int flags, void *cb_data)
{
if (!strcmp(refname, "bad")) {
current_bad_oid = xmalloc(sizeof(*current_bad_oid));
hashcpy(current_bad_oid->hash, sha1);
oidcpy(current_bad_oid, oid);
} else if (starts_with(refname, "good-")) {
sha1_array_append(&good_revs, sha1);
sha1_array_append(&good_revs, oid->hash);
} else if (starts_with(refname, "skip-")) {
sha1_array_append(&skipped_revs, sha1);
sha1_array_append(&skipped_revs, oid->hash);
}
return 0;
......@@ -417,10 +417,7 @@ static int register_ref(const char *refname, const unsigned char *sha1,
static int read_bisect_refs(void)
{
struct each_ref_fn_sha1_adapter wrapped_register_ref =
{register_ref, NULL};
return for_each_ref_in("refs/bisect/", each_ref_fn_adapter, &wrapped_register_ref);
return for_each_ref_in("refs/bisect/", register_ref, NULL);
}
static void read_bisect_paths(struct argv_array *array)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册