Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
git-fetch --upload-pack: disambiguate.
[gitweb.git]
/
sha1_name.c
diff --git
a/sha1_name.c
b/sha1_name.c
index 67b69a54fb730548f668d274ec58ff4ffc544f37..b13ed78cee0ee7f6d5ed3b45acee7b308a02c3f6 100644
(file)
--- a/
sha1_name.c
+++ b/
sha1_name.c
@@
-188,7
+188,10
@@
const char *find_unique_abbrev(const unsigned char *sha1, int len)
{
int status;
static char hex[41];
+
memcpy(hex, sha1_to_hex(sha1), 40);
+ if (len == 40)
+ return hex;
while (len < 40) {
unsigned char sha1_ret[20];
status = get_short_sha1(hex, len, sha1_ret, 1);