summaryrefslogtreecommitdiff
path: root/sha1_name.c
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 e18a96d772..ba0747c84d 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -155,7 +155,7 @@ static int get_short_sha1(const char *name, int len, unsigned char *sha1,
char canonical[40];
unsigned char res[20];
- if (len < 4)
+ if (len < MINIMUM_ABBREV)
return -1;
memset(res, 0, 20);
memset(canonical, 'x', 40);