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:
Diffstat (limited to 'sha1_name.c')
-rw-r--r--sha1_name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index df45b172a3..fdd321448c 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -148,7 +148,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1)
};
const char **p;
- if (!get_sha1_hex(str, sha1))
+ if (len == 40 && !get_sha1_hex(str, sha1))
return 0;
for (p = prefix; *p; p++) {