Merge branch 'bc/object-id'
[git/git.git] / sha1-name.c
index ba6a5a6..e072d48 100644 (file)
@@ -1652,6 +1652,7 @@ static int get_oid_with_context_1(const char *name,
                        struct commit_list *list = NULL;
 
                        for_each_ref(handle_one_ref, &list);
+                       head_ref(handle_one_ref, &list);
                        commit_list_sort_by_date(&list);
                        return get_oid_oneline(name + 2, oid, list);
                }