pack-refs: call fflush before fsync.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Oct 4, 2006 at 21:37 UTC
422b4a0e03658d0933a7abc149f175735ea9c4b5
1 file changed
+1
builtin-pack-refs.c
+1
@@ -89,6 +89,7 @@ int cmd_pack_refs(int argc, const char **argv, const char *prefix)
89
die("unable to create ref-pack file structure (%s)",
90
strerror(errno));
91
for_each_ref(handle_one_ref, &cbdata);
92
+ fflush(cbdata.refs_file);
93
fsync(fd);
94
fclose(cbdata.refs_file);
95
if (commit_lock_file(&packed) < 0)