Commit d6e648b413318b329500ebc789b4615513a9833a

Stefan Sperling 2019-02-10T15:32:19

make 'got tree' identify executable files

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/got/got.c b/got/got.c
index 755f467..a2d01e1 100644
--- a/got/got.c
+++ b/got/got.c
@@ -1304,8 +1304,8 @@ print_entry(struct got_tree_entry *te, const char *id, const char *path,
 		path++;
 
 	printf("%s%s%s%s%s\n", id ? id : "", path,
-	    is_root_path ? "" : "/",
-	    te->name, S_ISDIR(te->mode) ? "/" : "");
+	    is_root_path ? "" : "/", te->name,
+	    S_ISDIR(te->mode) ? "/" : ((te->mode & S_IXUSR) ? "*" : ""));
 }
 
 static const struct got_error *