diff options
| author | Vicent Martà <tanoku@gmail.com> | 2011-10-28 19:04:23 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2011-10-28 19:04:23 -0700 |
| commit | 89fb8f025a1f72b90f1f9563c85bf43b7f66ba60 (patch) | |
| tree | 11726793eecf4670d4948a22e276dd3d50d1addb /src/reflog.c | |
| parent | 3286c408eccb18c525ca123383f3ebf5097441bc (diff) | |
| parent | 01ad7b3a9ec8f5e465f94c2704e1e96b84f941c7 (diff) | |
| download | libgit2-89fb8f025a1f72b90f1f9563c85bf43b7f66ba60.tar.gz | |
Merge pull request #456 from brodie/perm-fixes
Create objects, indexes, and directories with the right file permissions
Diffstat (limited to 'src/reflog.c')
| -rw-r--r-- | src/reflog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/reflog.c b/src/reflog.c index a7e1f9259..5fc357a0f 100644 --- a/src/reflog.c +++ b/src/reflog.c @@ -71,7 +71,7 @@ static int reflog_write(const char *log_path, const char *oid_old, } git_filebuf_write(&fbuf, log.ptr, log.size); - error = git_filebuf_commit(&fbuf); + error = git_filebuf_commit(&fbuf, GIT_REFLOG_FILE_MODE); git_buf_free(&log); return error == GIT_SUCCESS ? GIT_SUCCESS : git__rethrow(error, "Failed to write reflog"); @@ -226,7 +226,7 @@ int git_reflog_write(git_reference *ref, const git_oid *oid_old, git_path_join_n(log_path, 3, ref->owner->path_repository, GIT_REFLOG_DIR, ref->name); if (git_futils_exists(log_path)) { - if ((error = git_futils_mkpath2file(log_path)) < GIT_SUCCESS) + if ((error = git_futils_mkpath2file(log_path, GIT_REFLOG_DIR_MODE)) < GIT_SUCCESS) return git__rethrow(error, "Failed to write reflog. Cannot create reflog directory"); } else if (git_futils_isfile(log_path)) { return git__throw(GIT_ERROR, "Failed to write reflog. `%s` is directory", log_path); |
