Also remove a `ftruncate(2)` call in `git_indexer_commit` Now that we're not using `mmap(2)` for writing stuff, we don't need to truncate the file afterwards, since it'll have the correct size at the end of the process. Whee~!
diff --git a/src/indexer.c b/src/indexer.c
index a5c282a..d1e354a 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -1234,12 +1234,6 @@ int git_indexer_commit(git_indexer *idx, git_indexer_progress *stats)
if (git_mwindow_free_all(&idx->pack->mwf) < 0)
goto on_error;
- /* Truncate file to undo rounding up to next page_size in append_to_pack */
- if (p_ftruncate(idx->pack->mwf.fd, idx->pack->mwf.size) < 0) {
- git_error_set(GIT_ERROR_OS, "failed to truncate pack file '%s'", idx->pack->pack_name);
- return -1;
- }
-
if (idx->do_fsync && p_fsync(idx->pack->mwf.fd) < 0) {
git_error_set(GIT_ERROR_OS, "failed to fsync packfile");
goto on_error;