projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72ee96c
)
find_unique_abbrev() with len=0 should not abbreviate
author
Junio C Hamano
<junkio@cox.net>
Wed, 9 Aug 2006 20:17:04 +0000
(13:17 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Wed, 9 Aug 2006 20:17:04 +0000
(13:17 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_name.c
patch
|
blob
|
history
diff --git
a/sha1_name.c
b/sha1_name.c
index 5fe8e5d4bf25d79c3fa76610d1617ee07c1f1e2c..c5a05faeb6b2bac74f4c5e06c5e397dc103bb190 100644
(file)
--- 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];