summaryrefslogtreecommitdiff
path: root/sha1_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 6d10f05..1aad0a3 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -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);
}