Skip to content

Commit b4ebaf9

Browse files
mhaggergitster
authored andcommitted
mark_complete(): rewrite to take an object_id argument
Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 21758af commit b4ebaf9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

walker.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,11 @@ static int interpret_target(struct walker *walker, char *target, unsigned char *
200200
return -1;
201201
}
202202

203-
static int mark_complete(const char *path, const unsigned char *sha1, int flag, void *cb_data)
203+
static int mark_complete(const char *path, const struct object_id *oid,
204+
int flag, void *cb_data)
204205
{
205-
struct commit *commit = lookup_commit_reference_gently(sha1, 1);
206+
struct commit *commit = lookup_commit_reference_gently(oid->hash, 1);
207+
206208
if (commit) {
207209
commit->object.flags |= COMPLETE;
208210
commit_list_insert(commit, &complete);
@@ -269,10 +271,7 @@ int walker_fetch(struct walker *walker, int targets, char **target,
269271
}
270272

271273
if (!walker->get_recover) {
272-
struct each_ref_fn_sha1_adapter wrapped_mark_complete =
273-
{mark_complete, NULL};
274-
275-
for_each_ref(each_ref_fn_adapter, &wrapped_mark_complete);
274+
for_each_ref(mark_complete, NULL);
276275
commit_list_sort_by_date(&complete);
277276
}
278277

0 commit comments

Comments
 (0)