From 4c81b03e30d13dbc93ea7071438ef2da0acd4189 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 30 May 2008 08:42:16 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- index-pack.c | 1 + 1 file changed, 1 insertion(+) (limited to 'index-pack.c') diff --git a/index-pack.c b/index-pack.c index aaba9443cc..5ac91baf98 100644 --- a/index-pack.c +++ b/index-pack.c @@ -694,6 +694,7 @@ static void final(const char *final_pack_name, const char *curr_pack_name, if (!from_stdin) { close(input_fd); } else { + fsync_or_die(output_fd, curr_pack_name); err = close(output_fd); if (err) die("error while closing pack file: %s", strerror(errno)); -- cgit v1.2.3