diff options
-rw-r--r-- | sha1_name.c | 2 |
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++) { |