Thread (65 messages) flat view 65 messages, 4 authors, 2016-06-15
STALE3727d

Revision rfc of 3 in this series.

Revisions (3)
  1. rfc current
  2. v2 [diff vs current]
  3. v3 [diff vs current]

[PATCH 3/8] ls_colors.c: enable coloring on u+x files

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 23:00:23
Subsystem: the rest · Maintainer: Linus Torvalds

git-compat-util.h does not seem to carry S_IXUGO. Anyway as far as Git
is concerned, we only care one executable bit. Hard code it.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 ls_colors.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/ls_colors.c b/ls_colors.c
index d492ab3..23f1e0b 100644
--- a/ls_colors.c
+++ b/ls_colors.c
@@ -427,10 +427,8 @@ void print_color_indicator(const char *name, mode_t mode, int linkok,
 				type = C_SETUID;
 			else if ((mode & S_ISGID) != 0)
 				type = C_SETGID;
-#if 0
-			else if ((mode & S_IXUGO) != 0)
+			else if ((mode & 0100) != 0)
 				type = C_EXEC;
-#endif
 		} else if (S_ISDIR(mode)) {
 			if ((mode & S_ISVTX) && (mode & S_IWOTH))
 				type = C_STICKY_OTHER_WRITABLE;
-- 
1.9.0.40.gaa8c3ea
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help