update code.gitea.io/git (#450)
This commit is contained in:
parent
0c5c34d7dd
commit
47a7529d96
36 changed files with 509 additions and 480 deletions
6
vendor/code.gitea.io/git/tree_blob.go
generated
vendored
6
vendor/code.gitea.io/git/tree_blob.go
generated
vendored
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue