summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-27 19:48:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-27 20:33:56 (GMT)
commit0c68d386da710940a22712b8f3539f7e73ba1b8f (patch)
tree212494452f9b31370c983bec9ab1286b54e005ae /builtin-pack-objects.c
parentd0b92a3f6e4d98a38a86cbd86f0e39eea9005958 (diff)
downloadgit-0c68d386da710940a22712b8f3539f7e73ba1b8f.zip
git-0c68d386da710940a22712b8f3539f7e73ba1b8f.tar.gz
git-0c68d386da710940a22712b8f3539f7e73ba1b8f.tar.bz2
index-pack: be careful after fixing up the header/footer
The index-pack command, when processing a thin pack, fixed up the pack after-the-fact. It forgets to fsync the result, because it only did that in one path rather in all cases of fixup. This moves the fsync_or_die() to the fix-up routine itself, rather than doing it in one of the callers, so that all cases are covered. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 2dadec1..d394c49 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -499,7 +499,6 @@ static void write_pack_file(void)
} else {
int fd = sha1close(f, NULL, 0);
fixup_pack_header_footer(fd, sha1, pack_tmp_name, nr_written);
- fsync_or_die(fd, pack_tmp_name);
close(fd);
}