summaryrefslogtreecommitdiff
path: root/src/fetchhead.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/fetchhead.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/fetchhead.c')
-rw-r--r--src/fetchhead.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fetchhead.c b/src/fetchhead.c
index 4dcebb857..9672623ff 100644
--- a/src/fetchhead.c
+++ b/src/fetchhead.c
@@ -112,7 +112,7 @@ int git_fetchhead_write(git_repository *repo, git_vector *fetchhead_refs)
if (git_buf_joinpath(&path, repo->path_repository, GIT_FETCH_HEAD_FILE) < 0)
return -1;
- if (git_filebuf_open(&file, path.ptr, GIT_FILEBUF_FORCE) < 0) {
+ if (git_filebuf_open(&file, path.ptr, GIT_FILEBUF_FORCE, GIT_REFS_FILE_MODE) < 0) {
git_buf_free(&path);
return -1;
}
@@ -124,7 +124,7 @@ int git_fetchhead_write(git_repository *repo, git_vector *fetchhead_refs)
git_vector_foreach(fetchhead_refs, i, fetchhead_ref)
fetchhead_ref_write(&file, fetchhead_ref);
- return git_filebuf_commit(&file, GIT_REFS_FILE_MODE);
+ return git_filebuf_commit(&file);
}
static int fetchhead_ref_parse(