diff options
author | Russell Belfer <rb@github.com> | 2013-09-05 16:14:32 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-09-05 16:14:32 -0700 |
commit | a7fcc44dcf3b2925ba366543486afd102b41838c (patch) | |
tree | bc23c09c01594392a4560dc7c0629489c73a9e0d /src | |
parent | af22dabb4366f8b2dd4acd5725a25e88842d6938 (diff) | |
download | libgit2-a7fcc44dcf3b2925ba366543486afd102b41838c.tar.gz |
Better macro name for is-exec-bit-set test
Diffstat (limited to 'src')
-rw-r--r-- | src/checkout.c | 2 | ||||
-rw-r--r-- | src/diff_print.c | 2 | ||||
-rw-r--r-- | src/fileops.h | 6 | ||||
-rw-r--r-- | src/tree.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/checkout.c b/src/checkout.c index f3a9b343d..aae354ca6 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -696,7 +696,7 @@ static int buffer_to_file( if (st != NULL && (error = p_stat(path, st)) < 0) giterr_set(GITERR_OS, "Error statting '%s'", path); - else if (GIT_PERMS_EXECUTABLE(file_mode) && + else if (GIT_PERMS_IS_EXEC(file_mode) && (error = p_chmod(path, file_mode)) < 0) giterr_set(GITERR_OS, "Failed to set permissions on '%s'", path); diff --git a/src/diff_print.c b/src/diff_print.c index 96937d84d..ee4b5fc17 100644 --- a/src/diff_print.c +++ b/src/diff_print.c @@ -46,7 +46,7 @@ static char diff_pick_suffix(int mode) { if (S_ISDIR(mode)) return '/'; - else if (GIT_PERMS_EXECUTABLE(mode)) /* -V536 */ + else if (GIT_PERMS_IS_EXEC(mode)) /* -V536 */ /* in git, modes are very regular, so we must have 0100755 mode */ return '*'; else diff --git a/src/fileops.h b/src/fileops.h index f2144566d..02f79b9e7 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -223,9 +223,9 @@ extern int git_futils_open_ro(const char *path); */ extern git_off_t git_futils_filesize(git_file fd); -#define GIT_PERMS_EXECUTABLE(MODE) (((MODE) & 0111) != 0) -#define GIT_PERMS_CANONICAL(MODE) (GIT_PERMS_EXECUTABLE(MODE) ? 0755 : 0644) -#define GIT_PERMS_FOR_WRITE(MODE) (GIT_PERMS_EXECUTABLE(MODE) ? 0777 : 0666) +#define GIT_PERMS_IS_EXEC(MODE) (((MODE) & 0111) != 0) +#define GIT_PERMS_CANONICAL(MODE) (GIT_PERMS_IS_EXEC(MODE) ? 0755 : 0644) +#define GIT_PERMS_FOR_WRITE(MODE) (GIT_PERMS_IS_EXEC(MODE) ? 0777 : 0666) #define GIT_MODE_PERMS_MASK 0777 #define GIT_MODE_TYPE_MASK 0170000 diff --git a/src/tree.c b/src/tree.c index 91309e107..f9469195a 100644 --- a/src/tree.c +++ b/src/tree.c @@ -33,7 +33,7 @@ GIT_INLINE(git_filemode_t) normalize_filemode(git_filemode_t filemode) return GIT_FILEMODE_TREE; /* If any of the x bits are set */ - if (GIT_PERMS_EXECUTABLE(filemode)) + if (GIT_PERMS_IS_EXEC(filemode)) return GIT_FILEMODE_BLOB_EXECUTABLE; /* 16XXXX means commit */ |