diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-30 08:42:16 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-05-31 14:46:57 -0700 |
commit | 4c81b03e30d13dbc93ea7071438ef2da0acd4189 (patch) | |
tree | 73459678fa41737c15a2957215d51bde97528ddf /pack-write.c | |
parent | d2b3691b61d516a0ad2bf700a2a5d9113ceff0b1 (diff) | |
download | git-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 'pack-write.c')
-rw-r--r-- | pack-write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-write.c b/pack-write.c index c66c8af725..f52cabe838 100644 --- a/pack-write.c +++ b/pack-write.c @@ -139,7 +139,7 @@ char *write_idx_file(char *index_name, struct pack_idx_entry **objects, } sha1write(f, sha1, 20); - sha1close(f, NULL, 1); + sha1close(f, NULL, CSUM_FSYNC); SHA1_Final(sha1, &ctx); return index_name; } |