summaryrefslogtreecommitdiff
path: root/src/config_file.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/config_file.c
parentf966acd13366d21e0b9beeecf021c0114596c716 (diff)
downloadlibgit2-1d3a8aeb4bd032d0bf34039fbcb308fba06b862a.tar.gz
move mode_t to filebuf_open instead of _commit
Diffstat (limited to 'src/config_file.c')
-rw-r--r--src/config_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config_file.c b/src/config_file.c
index c7fc32060..40dcc5a37 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -1210,7 +1210,7 @@ static int config_write(diskfile_backend *cfg, const char *key, const regex_t *p
write_start = data_start;
/* Lock the file */
- if (git_filebuf_open(&file, cfg->file_path, 0) < 0)
+ if (git_filebuf_open(&file, cfg->file_path, 0, GIT_CONFIG_FILE_MODE) < 0)
return -1;
skip_bom(reader);
@@ -1369,7 +1369,7 @@ static int config_write(diskfile_backend *cfg, const char *key, const regex_t *p
/* refresh stats - if this errors, then commit will error too */
(void)git_filebuf_stats(&reader->file_mtime, &reader->file_size, &file);
- result = git_filebuf_commit(&file, GIT_CONFIG_FILE_MODE);
+ result = git_filebuf_commit(&file);
git_buf_free(&reader->buffer);
return result;