aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-03 11:46:16 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-03 11:46:16 -0700
commitaac17941320f7f73e5d411b152bfd041572e8a66 (patch)
treed9d60eafac14cba0eb18bee4f2c762ed5ed98956 /cache.h
parent92d4c85d248728b1937d01fdd088173753c6994d (diff)
downloadgit-aac17941320f7f73e5d411b152bfd041572e8a66.tar.gz
git-aac17941320f7f73e5d411b152bfd041572e8a66.tar.xz
Improve sha1 object file writing.
Make it much safer: we write to a temporary file, and then link that temporary file to the final destination. This avoids all the nasty races if several people write the same object at the same time. It should also result in nicer on-disk layout, since it means that objects all get created in the same subdirectory. That makes a lot of block allocation algorithms happier, since the objects will now be allocated from the same zone.
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index 94f22c21d..8dd812827 100644
--- a/cache.h
+++ b/cache.h
@@ -128,9 +128,6 @@ extern int index_fd(unsigned char *sha1, int fd, struct stat *st);
/* Return a statically allocated filename matching the sha1 signature */
extern char *sha1_file_name(const unsigned char *sha1);
-/* Write a memory buffer out to the sha file */
-extern int write_sha1_buffer(const unsigned char *sha1, void *buf, unsigned int size);
-
/* Read and unpack a sha1 file into memory, write memory to a sha1 file */
extern void * map_sha1_file(const unsigned char *sha1, unsigned long *size);
extern void * unpack_sha1_file(void *map, unsigned long mapsize, char *type, unsigned long *size);