summaryrefslogtreecommitdiff
path: root/src/indexer.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2013-11-04 18:28:57 -0500
committerEdward Thomson <ethomson@microsoft.com>2013-11-04 22:33:05 -0500
commit1d3a8aeb4bd032d0bf34039fbcb308fba06b862a (patch)
tree8e9165cfd8c4c3919abd2d4f301b1f45e281d5eb /src/indexer.c
parentf966acd13366d21e0b9beeecf021c0114596c716 (diff)
downloadlibgit2-1d3a8aeb4bd032d0bf34039fbcb308fba06b862a.tar.gz
move mode_t to filebuf_open instead of _commit
Diffstat (limited to 'src/indexer.c')
-rw-r--r--src/indexer.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/indexer.c b/src/indexer.c
index 0873c8cf0..90fb52187 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -140,7 +140,8 @@ int git_indexer_new(
goto cleanup;
error = git_filebuf_open(&idx->pack_file, path.ptr,
- GIT_FILEBUF_TEMPORARY | GIT_FILEBUF_DO_NOT_BUFFER);
+ GIT_FILEBUF_TEMPORARY | GIT_FILEBUF_DO_NOT_BUFFER,
+ GIT_PACK_FILE_MODE);
git_buf_free(&path);
if (error < 0)
goto cleanup;
@@ -903,7 +904,8 @@ int git_indexer_commit(git_indexer *idx, git_transfer_progress *stats)
if (git_buf_oom(&filename))
return -1;
- if (git_filebuf_open(&index_file, filename.ptr, GIT_FILEBUF_HASH_CONTENTS) < 0)
+ if (git_filebuf_open(&index_file, filename.ptr,
+ GIT_FILEBUF_HASH_CONTENTS, GIT_PACK_FILE_MODE) < 0)
goto on_error;
/* Write out the header */
@@ -969,7 +971,7 @@ int git_indexer_commit(git_indexer *idx, git_transfer_progress *stats)
goto on_error;
/* Commit file */
- if (git_filebuf_commit_at(&index_file, filename.ptr, GIT_PACK_FILE_MODE) < 0)
+ if (git_filebuf_commit_at(&index_file, filename.ptr) < 0)
goto on_error;
git_mwindow_free_all(&idx->pack->mwf);
@@ -980,7 +982,7 @@ int git_indexer_commit(git_indexer *idx, git_transfer_progress *stats)
if (index_path(&filename, idx, ".pack") < 0)
goto on_error;
/* And don't forget to rename the packfile to its new place. */
- if (git_filebuf_commit_at(&idx->pack_file, filename.ptr, GIT_PACK_FILE_MODE) < 0)
+ if (git_filebuf_commit_at(&idx->pack_file, filename.ptr) < 0)
return -1;
git_buf_free(&filename);