pack-refs: call fflush before fsync.

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano 2006-10-04 21:37:15 -07:00
parent 03a182107f
commit 422b4a0e03

View File

@ -89,6 +89,7 @@ int cmd_pack_refs(int argc, const char **argv, const char *prefix)
die("unable to create ref-pack file structure (%s)",
strerror(errno));
for_each_ref(handle_one_ref, &cbdata);
fflush(cbdata.refs_file);
fsync(fd);
fclose(cbdata.refs_file);
if (commit_lock_file(&packed) < 0)