summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-05-04 00:14:56 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-05-04 00:14:56 -0700
commit4cc0b8a41b25356ad89f13ec2735756e5dada02a (patch)
treeac0ac1d6997364a99537b833355ec9b908868ff4 /sha1_file.c
parentMerge branch 'master' into next (diff)
parentAdd a conversion tool to migrate remote information into the config (diff)
downloadtgif-4cc0b8a41b25356ad89f13ec2735756e5dada02a.tar.xz
Merge branch 'js/fetchconfig' into next
* js/fetchconfig: Add a conversion tool to migrate remote information into the config fetch, pull: ask config for remote information Add a few more words to the glossary. Added definitions for a few words: Alphabetize the glossary. sha1_to_hex() usage cleanup
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++) {