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/refs.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/refs.c')
| -rw-r--r-- | src/refs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/refs.c b/src/refs.c index f21ca69de..679d7bbcc 100644 --- a/src/refs.c +++ b/src/refs.c @@ -9,6 +9,7 @@ #include "hash.h" #include "repository.h" #include "fileops.h" +#include "pack.h" #include <git2/tag.h> #include <git2/object.h> @@ -357,7 +358,7 @@ static int loose_write(git_reference *ref) goto unlock; } - error = git_filebuf_commit(&file); + error = git_filebuf_commit(&file, GIT_REFS_FILE_MODE); if (p_stat(ref_path, &st) == GIT_SUCCESS) ref->mtime = st.st_mtime; @@ -870,7 +871,7 @@ cleanup: /* if we've written all the references properly, we can commit * the packfile to make the changes effective */ if (error == GIT_SUCCESS) { - error = git_filebuf_commit(&pack_file); + error = git_filebuf_commit(&pack_file, GIT_PACK_FILE_MODE); /* when and only when the packfile has been properly written, * we can go ahead and remove the loose refs */ |
