From: Michael Haggerty <mhagger@xxxxxxxxxxxx> Signed-off-by: Michael Haggerty <mhagger@xxxxxxxxxxxx> Signed-off-by: brian m. carlson <sandals@xxxxxxxxxxxxxxxxxxxx> --- fetch-pack.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/fetch-pack.c b/fetch-pack.c index 5380b1b..1e875cf 100644 --- a/fetch-pack.c +++ b/fetch-pack.c @@ -70,9 +70,10 @@ static int rev_list_insert_ref(const char *refname, const unsigned char *sha1, i 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) 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) die("--stateless-rpc requires multi_ack_detailed"); - if (marked) { - struct each_ref_fn_sha1_adapter wrapped_clear_marks = - {clear_marks, NULL}; - - for_each_ref(each_ref_fn_adapter, &wrapped_clear_marks); - } + if (marked) + for_each_ref(clear_marks, NULL); marked = 1; for_each_ref(each_ref_fn_adapter, &wrapped_rev_list_insert_ref); -- 2.4.0 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html