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>
This commit is contained in:

committed by
Junio C Hamano

parent
d2b3691b61
commit
4c81b03e30
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user