Skip to content

Commit

Permalink
pack-refs: call fflush before fsync.
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Oct 5, 2006
1 parent 03a1821 commit 422b4a0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtin-pack-refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 422b4a0

Please sign in to comment.