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:
authorRussell Belfer <rb@github.com>2013-09-05 22:20:12 +0400
committerRussell Belfer <rb@github.com>2013-09-05 22:20:12 +0400
commitf240acce865ec14df0d517d5000316a933e7ffed (patch)
tree33bb2efbb07ac32178ce242899ecaa8c6842c308 /src/index.c
parent27061b151a7e0225186365ee0b5ca802d68782a9 (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.c2
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(