diff options
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c index 6d10f052b5..1aad0a3223 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); } |