diff options
author | Brodie Rao <brodie@bitheap.org> | 2011-09-06 15:48:45 -0700 |
---|---|---|
committer | Brodie Rao <brodie@bitheap.org> | 2011-10-14 16:07:47 -0700 |
commit | 01ad7b3a9ec8f5e465f94c2704e1e96b84f941c7 (patch) | |
tree | c44520dc0f23ceb24463ab6a2d0b754cd0b55cbb /src/reflog.h | |
parent | ce8cd006ce3adcd012a38401b8a7555ba3307b3f (diff) | |
download | libgit2-01ad7b3a9ec8f5e465f94c2704e1e96b84f941c7.tar.gz |
*: correct and codify various file permissions
The following files now have 0444 permissions:
- loose objects
- pack indexes
- pack files
- packs downloaded by fetch
- packs downloaded by the HTTP transport
And the following files now have 0666 permissions:
- config files
- repository indexes
- reflogs
- refs
This brings libgit2 more in line with Git.
Note that git_filebuf_commit() and git_filebuf_commit_at() have both
gained a new mode parameter.
The latter change fixes an important issue where filebufs created with
GIT_FILEBUF_TEMPORARY received 0600 permissions (due to mkstemp(3)
usage). Now we chmod() the file before renaming it into place.
Tests have been added to confirm that new commit, tag, and tree
objects are created with the right permissions. I don't have access to
Windows, so for now I've guarded the tests with "#ifndef GIT_WIN32".
Diffstat (limited to 'src/reflog.h')
-rw-r--r-- | src/reflog.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/reflog.h b/src/reflog.h index 16e9a94ec..44b063700 100644 --- a/src/reflog.h +++ b/src/reflog.h @@ -13,6 +13,7 @@ #define GIT_REFLOG_DIR "logs/" #define GIT_REFLOG_DIR_MODE 0777 +#define GIT_REFLOG_FILE_MODE 0666 #define GIT_REFLOG_SIZE_MIN (2*GIT_OID_HEXSZ+2+17) |