From: Junio C Hamano Date: Thu, 5 Oct 2006 04:37:15 +0000 (-0700) Subject: pack-refs: call fflush before fsync. X-Git-Tag: v1.4.4-rc1~44^2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=422b4a0e03658d0933a7abc149f175735ea9c4b5;p=git.git pack-refs: call fflush before fsync. Signed-off-by: Junio C Hamano --- diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c index ede47434e..23d0d0720 100644 --- a/builtin-pack-refs.c +++ b/builtin-pack-refs.c @@ -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)