I've just pushed a commit which adds the Filemode
entry to the struct. I'm not quite sure why it was missed when first added.
Once you have your var entry TreeEntry
you can use entry.Filemode
to get the mode. There are also a few constants defined so you don't have to play with large octal numbers or the unix functions. For symlinks, it'd be git.FilemodeLink
.
You should remember that this is about mode and type of entry, as git doesn't store permissions as such and you shouldn't read anything permission-wise into these values.