summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorMartin Langhoff <martin@catalyst.net.nz>2006-05-08 10:03:37 +1200
committerMartin Langhoff <martin@catalyst.net.nz>2006-05-08 10:03:37 +1200
commit50c08d48722149d95f46bcc80a5211ea04b8a809 (patch)
tree15c465be37ba4fdd8824edb95085b81076b73af9 /sha1_file.c
parenta248c9614fdd130229fb5f9565abbd77bd1d0cc9 (diff)
parentbe65e7d9fbd3ae6fc097cedade2afe39805fcf4e (diff)
downloadgit-50c08d48722149d95f46bcc80a5211ea04b8a809.tar.gz
Merge with git://kernel.org/pub/scm/git/git.git
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c
index f2d33afb27..5464828259 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -108,9 +108,10 @@ int safe_create_leading_directories(char *path)
char * sha1_to_hex(const unsigned char *sha1)
{
- static char buffer[50];
+ static int bufno;
+ static char hexbuffer[4][50];
static const char hex[] = "0123456789abcdef";
- char *buf = buffer;
+ char *buffer = hexbuffer[3 & ++bufno], *buf = buffer;
int i;
for (i = 0; i < 20; i++) {