clear_marks(): rewrite to take an object_id argument
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
b4ebaf9eea
commit
c50fb6cee6
13
fetch-pack.c
13
fetch-pack.c
@ -70,9 +70,10 @@ static int rev_list_insert_ref(const char *refname, const unsigned char *sha1, i
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int clear_marks(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
|
static int clear_marks(const char *refname, const struct object_id *oid,
|
||||||
|
int flag, void *cb_data)
|
||||||
{
|
{
|
||||||
struct object *o = deref_tag(parse_object(sha1), refname, 0);
|
struct object *o = deref_tag(parse_object(oid->hash), refname, 0);
|
||||||
|
|
||||||
if (o && o->type == OBJ_COMMIT)
|
if (o && o->type == OBJ_COMMIT)
|
||||||
clear_commit_marks((struct commit *)o,
|
clear_commit_marks((struct commit *)o,
|
||||||
@ -261,12 +262,8 @@ static int find_common(struct fetch_pack_args *args,
|
|||||||
|
|
||||||
if (args->stateless_rpc && multi_ack == 1)
|
if (args->stateless_rpc && multi_ack == 1)
|
||||||
die("--stateless-rpc requires multi_ack_detailed");
|
die("--stateless-rpc requires multi_ack_detailed");
|
||||||
if (marked) {
|
if (marked)
|
||||||
struct each_ref_fn_sha1_adapter wrapped_clear_marks =
|
for_each_ref(clear_marks, NULL);
|
||||||
{clear_marks, NULL};
|
|
||||||
|
|
||||||
for_each_ref(each_ref_fn_adapter, &wrapped_clear_marks);
|
|
||||||
}
|
|
||||||
marked = 1;
|
marked = 1;
|
||||||
|
|
||||||
for_each_ref(each_ref_fn_adapter, &wrapped_rev_list_insert_ref);
|
for_each_ref(each_ref_fn_adapter, &wrapped_rev_list_insert_ref);
|
||||||
|
Loading…
Reference in New Issue
Block a user