summaryrefslogtreecommitdiff
path: root/src/config_file.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2013-11-05 04:48:45 -0800
committerEdward Thomson <ethomson@edwardthomson.com>2013-11-05 04:48:45 -0800
commit3ae66ef1af2af9132c96c57bf5c6e2cfdb1f617c (patch)
tree8615cf3c6a3cbfe454d108896b3b6b7d3904d531 /src/config_file.c
parentb47949254ee5b7e5801fd3d1d80136bff5db938a (diff)
parent1d3a8aeb4bd032d0bf34039fbcb308fba06b862a (diff)
downloadlibgit2-3ae66ef1af2af9132c96c57bf5c6e2cfdb1f617c.tar.gz
Merge pull request #1940 from ethomson/filebuf_umask
Take umask into account in filebuf_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;