Code

pack-refs: call fflush before fsync.
authorJunio C Hamano <junkio@cox.net>
Thu, 5 Oct 2006 04:37:15 +0000 (21:37 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 5 Oct 2006 04:37:15 +0000 (21:37 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-pack-refs.c

index ede47434e3d0b5e5dcb560c1cf30884d43d52434..23d0d0720e2e617b9a4187ac1ba37b2605e4a940 100644 (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)