shallow: rewrite functions to take object_id arguments
[gitweb.git] / walker.c
index 483da4e0fb5771b8a64d62648624258dcf3fdcb0..bb2e0b9328de444f8546bbeb34fbd2dddd307b81 100644 (file)
--- a/walker.c
+++ b/walker.c
@@ -269,7 +269,10 @@ int walker_fetch(struct walker *walker, int targets, char **target,
        }
 
        if (!walker->get_recover) {
-               for_each_ref(mark_complete, NULL);
+               struct each_ref_fn_sha1_adapter wrapped_mark_complete =
+                       {mark_complete, NULL};
+
+               for_each_ref(each_ref_fn_adapter, &wrapped_mark_complete);
                commit_list_sort_by_date(&complete);
        }
 
@@ -299,7 +302,7 @@ int walker_fetch(struct walker *walker, int targets, char **target,
                strbuf_reset(&refname);
                strbuf_addf(&refname, "refs/%s", write_ref[i]);
                if (ref_transaction_update(transaction, refname.buf,
-                                          &sha1[20 * i], NULL, 0, 0,
+                                          &sha1[20 * i], NULL, 0,
                                           msg ? msg : "fetch (unknown)",
                                           &err)) {
                        error("%s", err.buf);