Code

index-pack: be careful after fixing up the header/footer
[git.git] / pack-write.c
index a8f02699366c87de960d7637e9f69c26c2241693..ddcfd37af263a5fe1009473cba879b00f4b6692d 100644 (file)
@@ -179,6 +179,7 @@ void fixup_pack_header_footer(int pack_fd,
 
        SHA1_Final(pack_file_sha1, &c);
        write_or_die(pack_fd, pack_file_sha1, 20);
+       fsync_or_die(pack_fd, pack_name);
 }
 
 char *index_pack_lockfile(int ip_out)