Merge branch 'fix'
[gitweb.git] / sha1_name.c
index 3adaec3167d19fd9e3f2c3f6c06530583428c3c6..4f92e12a8dfce29b5bb50108468259d9f04653f3 100644 (file)
@@ -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++;
                        }