append_matching_ref(): rewrite to take an object_id argument
[gitweb.git] / sha1_name.c
index 6d10f052b5050c64de5589733c2a8600e2ddb3dc..1aad0a3223564bea10fd470dfc83e3329b75e5c3 100644 (file)
@@ -1371,7 +1371,10 @@ static int get_sha1_with_context_1(const char *name,
                int pos;
                if (!only_to_die && namelen > 2 && name[1] == '/') {
                        struct commit_list *list = NULL;
-                       for_each_ref(handle_one_ref, &list);
+                       struct each_ref_fn_sha1_adapter wrapped_handle_one_ref =
+                               {handle_one_ref, &list};
+
+                       for_each_ref(each_ref_fn_adapter, &wrapped_handle_one_ref);
                        commit_list_sort_by_date(&list);
                        return get_sha1_oneline(name + 2, sha1, list);
                }