diff options
Diffstat (limited to 'vendor/code.gitea.io/git/tree_entry.go')
-rw-r--r-- | vendor/code.gitea.io/git/tree_entry.go | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/vendor/code.gitea.io/git/tree_entry.go b/vendor/code.gitea.io/git/tree_entry.go index 6201eef8fd..ead0d4f5df 100644 --- a/vendor/code.gitea.io/git/tree_entry.go +++ b/vendor/code.gitea.io/git/tree_entry.go @@ -18,15 +18,15 @@ type EntryMode int // one of these. const ( // EntryModeBlob - EntryModeBlob EntryMode = 0100644 + EntryModeBlob EntryMode = 0x0100644 // EntryModeExec - EntryModeExec EntryMode = 0100755 + EntryModeExec EntryMode = 0x0100755 // EntryModeSymlink - EntryModeSymlink EntryMode = 0120000 + EntryModeSymlink EntryMode = 0x0120000 // EntryModeCommit - EntryModeCommit EntryMode = 0160000 + EntryModeCommit EntryMode = 0x0160000 // EntryModeTree - EntryModeTree EntryMode = 0040000 + EntryModeTree EntryMode = 0x0040000 ) // TreeEntry the leaf in the git tree @@ -50,6 +50,11 @@ func (te *TreeEntry) Name() string { return te.name } +// Mode returns the mode of the entry +func (te *TreeEntry) Mode() EntryMode { + return te.mode +} + // Size returns the size of the entry func (te *TreeEntry) Size() int64 { if te.IsDir() { |