OSDN Git Service
(root)
/
git-core
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Git 2.11.2
[git-core/git.git]
/
sha1_name.c
diff --git
a/sha1_name.c
b/sha1_name.c
index
06409a3
..
73a915f
100644
(file)
--- a/
sha1_name.c
+++ b/
sha1_name.c
@@
-510,7
+510,8
@@
const char *find_unique_abbrev(const unsigned char *sha1, int len)
{
static int bufno;
static char hexbuffer[4][GIT_SHA1_HEXSZ + 1];
- char *hex = hexbuffer[3 & ++bufno];
+ char *hex = hexbuffer[bufno];
+ bufno = (bufno + 1) % ARRAY_SIZE(hexbuffer);
find_unique_abbrev_r(hex, sha1, len);
return hex;
}