diff options
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c index c71fc172f5..06409a3845 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -508,7 +508,9 @@ int find_unique_abbrev_r(char *hex, const unsigned char *sha1, int len) const char *find_unique_abbrev(const unsigned char *sha1, int len) { - static char hex[GIT_SHA1_HEXSZ + 1]; + static int bufno; + static char hexbuffer[4][GIT_SHA1_HEXSZ + 1]; + char *hex = hexbuffer[3 & ++bufno]; find_unique_abbrev_r(hex, sha1, len); return hex; } |