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:
authorJunio C Hamano <junkio@cox.net>2006-08-10 00:17:04 +0400
committerJunio C Hamano <junkio@cox.net>2006-08-10 00:17:04 +0400
commit02c5cba2007856465710aa37cd41b404372ab95b (patch)
tree72c1e598e3f730d2e2778183552262b1fe1d7758
parent72ee96c0f1861fcdb9eaf39e78d86888437a27a9 (diff)
find_unique_abbrev() with len=0 should not abbreviate
Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--sha1_name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c
index 5fe8e5d4bf..c5a05faeb6 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -193,7 +193,7 @@ const char *find_unique_abbrev(const unsigned char *sha1, int len)
is_null = !memcmp(sha1, null_sha1, 20);
memcpy(hex, sha1_to_hex(sha1), 40);
- if (len == 40)
+ if (len == 40 || !len)
return hex;
while (len < 40) {
unsigned char sha1_ret[20];