diff options
author | Russell Belfer <rb@github.com> | 2013-09-05 22:20:12 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-09-05 22:20:12 +0400 |
commit | f240acce865ec14df0d517d5000316a933e7ffed (patch) | |
tree | 33bb2efbb07ac32178ce242899ecaa8c6842c308 /src/index.c | |
parent | 27061b151a7e0225186365ee0b5ca802d68782a9 (diff) |
Add more file mode permissions macros
This adds some more macros for some standard operations on file
modes, particularly related to permissions, and then updates a
number of places around the code base to use the new macros.
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 17e43903f..9b32222a7 100644 --- a/src/index.c +++ b/src/index.c @@ -284,7 +284,7 @@ static unsigned int index_create_mode(unsigned int mode) if (S_ISDIR(mode) || (mode & S_IFMT) == (S_IFLNK | S_IFDIR)) return (S_IFLNK | S_IFDIR); - return S_IFREG | ((mode & 0100) ? 0755 : 0644); + return S_IFREG | GIT_PERMS_CANONICAL(mode); } static unsigned int index_merge_mode( |