Merge branch 'jk/no-looking-at-dotgit-outside-repo'
A small code cleanup. * jk/no-looking-at-dotgit-outside-repo: sha1_name: make wraparound of the index into ring-buffer explicit
This commit is contained in:
commit
e828d33316
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user