summaryrefslogtreecommitdiff
path: root/csum-file.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-30 08:42:16 -0700
committerJunio C Hamano <gitster@pobox.com>2008-05-31 14:46:57 -0700
commit4c81b03e30d13dbc93ea7071438ef2da0acd4189 (patch)
tree73459678fa41737c15a2957215d51bde97528ddf /csum-file.h
parentd2b3691b61d516a0ad2bf700a2a5d9113ceff0b1 (diff)
downloadgit-4c81b03e30d13dbc93ea7071438ef2da0acd4189.tar.gz
Make pack creation always fsync() the result
This means that we can depend on packs always being stable on disk, simplifying a lot of the object serialization worries. And unlike loose objects, serializing pack creation IO isn't going to be a performance killer. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'csum-file.h')
-rw-r--r--csum-file.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/csum-file.h b/csum-file.h
index 1af76562f3..72c9487f4f 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -16,9 +16,13 @@ struct sha1file {
unsigned char buffer[8192];
};
+/* sha1close flags */
+#define CSUM_CLOSE 1
+#define CSUM_FSYNC 2
+
extern struct sha1file *sha1fd(int fd, const char *name);
extern struct sha1file *sha1fd_throughput(int fd, const char *name, struct progress *tp);
-extern int sha1close(struct sha1file *, unsigned char *, int);
+extern int sha1close(struct sha1file *, unsigned char *, unsigned int);
extern int sha1write(struct sha1file *, void *, unsigned int);
extern void crc32_begin(struct sha1file *);
extern uint32_t crc32_end(struct sha1file *);