summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-pack-refs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-pack-refs.c b/builtin-pack-refs.c
index ede4743..23d0d07 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)