Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2013-11-05 03:28:57 +0400
committerEdward Thomson <ethomson@microsoft.com>2013-11-05 07:33:05 +0400
commit1d3a8aeb4bd032d0bf34039fbcb308fba06b862a (patch)
tree8e9165cfd8c4c3919abd2d4f301b1f45e281d5eb /src/repository.c
parentf966acd13366d21e0b9beeecf021c0114596c716 (diff)
move mode_t to filebuf_open instead of _commit
Diffstat (limited to 'src/repository.c')
-rw-r--r--src/repository.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/repository.c b/src/repository.c
index c5ce8425f..dcc02e4fb 100644
--- a/src/repository.c
+++ b/src/repository.c
@@ -816,7 +816,7 @@ static int repo_init_create_head(const char *git_dir, const char *ref_name)
const char *fmt;
if (git_buf_joinpath(&ref_path, git_dir, GIT_HEAD_FILE) < 0 ||
- git_filebuf_open(&ref, ref_path.ptr, 0) < 0)
+ git_filebuf_open(&ref, ref_path.ptr, 0, GIT_REFS_FILE_MODE) < 0)
goto fail;
if (!ref_name)
@@ -828,7 +828,7 @@ static int repo_init_create_head(const char *git_dir, const char *ref_name)
fmt = "ref: " GIT_REFS_HEADS_DIR "%s\n";
if (git_filebuf_printf(&ref, fmt, ref_name) < 0 ||
- git_filebuf_commit(&ref, GIT_REFS_FILE_MODE) < 0)
+ git_filebuf_commit(&ref) < 0)
goto fail;
git_buf_free(&ref_path);
@@ -875,7 +875,7 @@ static bool are_symlinks_supported(const char *wd_path)
struct stat st;
int symlinks_supported = -1;
- if ((fd = git_futils_mktmp(&path, wd_path)) < 0 ||
+ if ((fd = git_futils_mktmp(&path, wd_path, 0666)) < 0 ||
p_close(fd) < 0 ||
p_unlink(path.ptr) < 0 ||
p_symlink("testing", path.ptr) < 0 ||