Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-07-25 00:50:49 +0300
committerJunio C Hamano <gitster@pobox.com>2018-07-25 00:50:49 +0300
commit53cae9e0f8d793c7e180f79b86ea2745c59f9bee (patch)
treed3f05ea6ec5784f6788a68076f7b326fa38df768 /sha1-name.c
parent18a86f32ab91a0be390508c0b3cdc374a00822a0 (diff)
parent6b3351e799f733561b98241f6ee88a9a72c13400 (diff)
Merge branch 'wc/find-commit-with-pattern-on-detached-head'
"git rev-parse ':/substring'" did not consider the history leading only to HEAD when looking for a commit with the given substring, when the HEAD is detached. This has been fixed. * wc/find-commit-with-pattern-on-detached-head: sha1-name.c: for ":/", find detached HEAD commits
Diffstat (limited to 'sha1-name.c')
-rw-r--r--sha1-name.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sha1-name.c b/sha1-name.c
index 60d9ef3c7e..641ca12f91 100644
--- a/sha1-name.c
+++ b/sha1-name.c
@@ -1650,6 +1650,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);
}