diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-22 17:30:52 +0800 |
---|---|---|
committer | Thomas Boerger <thomas@webhippie.de> | 2016-12-22 10:30:52 +0100 |
commit | 47a7529d9655e11471bbe39958222a13854a6133 (patch) | |
tree | 98e597255245e17d39a0062c3977fb8a510cf413 /vendor/code.gitea.io/git/tree_blob.go | |
parent | 0c5c34d7ddaf31a6d8123dac36b221de61f5ff96 (diff) | |
download | gitea-47a7529d9655e11471bbe39958222a13854a6133.tar.gz gitea-47a7529d9655e11471bbe39958222a13854a6133.zip |
update code.gitea.io/git (#450)
Diffstat (limited to 'vendor/code.gitea.io/git/tree_blob.go')
-rw-r--r-- | vendor/code.gitea.io/git/tree_blob.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/code.gitea.io/git/tree_blob.go b/vendor/code.gitea.io/git/tree_blob.go index e2e701521f..b3d205d8e1 100644 --- a/vendor/code.gitea.io/git/tree_blob.go +++ b/vendor/code.gitea.io/git/tree_blob.go @@ -9,12 +9,13 @@ import ( "strings" ) +// GetTreeEntryByPath get the tree entries accroding the sub dir func (t *Tree) GetTreeEntryByPath(relpath string) (*TreeEntry, error) { if len(relpath) == 0 { return &TreeEntry{ ID: t.ID, - Type: OBJECT_TREE, - mode: ENTRY_MODE_TREE, + Type: ObjectTree, + mode: EntryModeTree, }, nil } @@ -43,6 +44,7 @@ func (t *Tree) GetTreeEntryByPath(relpath string) (*TreeEntry, error) { return nil, ErrNotExist{"", relpath} } +// GetBlobByPath get the blob object accroding the path func (t *Tree) GetBlobByPath(relpath string) (*Blob, error) { entry, err := t.GetTreeEntryByPath(relpath) if err != nil { |