From ddf26bcafcf1ff9d1bcfff43491c216cfa0e6809 Mon Sep 17 00:00:00 2001 From: Alex Gorbatchev Date: Tue, 18 Oct 2011 10:03:40 -0700 Subject: [PATCH] Added is_symlink to the GitTree. --- lib/git_tree.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/git_tree.class.php b/lib/git_tree.class.php index f7a0495..5acb5cb 100644 --- a/lib/git_tree.class.php +++ b/lib/git_tree.class.php @@ -43,6 +43,9 @@ public function _unserialize($data) $pos = strpos($data, "\0", $start); list($node->mode, $node->name) = explode(' ', substr($data, $start, $pos-$start), 2); $node->mode = intval($node->mode, 8); + // alexgorbatchev :: http://www.raspberryginger.com/jbailey/minix/html/stat_8h.html + // added support for symlinks + $node->is_symlink = (($node->mode & 61440) == 40960); $node->is_dir = !!($node->mode & 040000); $node->is_submodule = ($node->mode == 57344); $node->object = substr($data, $pos+1, 20);