diff options
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sha1_name.c b/sha1_name.c index 3adaec3167..4f92e12a8d 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -236,7 +236,7 @@ static int ambiguous_path(const char *path, int len) static int get_sha1_basic(const char *str, int len, unsigned char *sha1) { static const char *fmt[] = { - "/%.*s", + "%.*s", "refs/%.*s", "refs/tags/%.*s", "refs/heads/%.*s", @@ -263,8 +263,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1) pathname = git_path(*p, len, str); if (!read_ref(pathname, this_result)) { if (warn_ambiguous_refs) { - if (already_found && - !memcmp(sha1, sha1_from_ref, 20)) + if (already_found) fprintf(stderr, warning, len, str); already_found++; } |