Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-30 19:42:16 +0400
committerJunio C Hamano <gitster@pobox.com>2008-06-01 01:46:57 +0400
commit4c81b03e30d13dbc93ea7071438ef2da0acd4189 (patch)
tree73459678fa41737c15a2957215d51bde97528ddf /fast-import.c
parentd2b3691b61d516a0ad2bf700a2a5d9113ceff0b1 (diff)
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 'fast-import.c')
-rw-r--r--fast-import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index 93119bbd94..e72b286794 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -890,7 +890,7 @@ static char *create_index(void)
SHA1_Update(&ctx, (*c)->sha1, 20);
}
sha1write(f, pack_data->sha1, sizeof(pack_data->sha1));
- sha1close(f, NULL, 1);
+ sha1close(f, NULL, CSUM_FSYNC);
free(idx);
SHA1_Final(pack_data->sha1, &ctx);
return tmpfile;