Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tree.c b/tree.c
index 4a26603f6e..468f99e494 100644
--- a/tree.c
+++ b/tree.c
@@ -122,8 +122,10 @@ int parse_tree(struct tree *item)
entry = xmalloc(sizeof(struct tree_entry_list));
entry->name = strdup(path + 1);
- entry->directory = S_ISDIR(mode);
- entry->executable = mode & S_IXUSR;
+ entry->directory = S_ISDIR(mode) != 0;
+ entry->executable = (mode & S_IXUSR) != 0;
+ entry->symlink = S_ISLNK(mode) != 0;
+ entry->mode = mode;
entry->next = NULL;
bufptr += len + 20;