mirror of
https://github.com/go-gitea/gitea
synced 2025-12-07 13:28:25 +00:00
Merge branch 'master' into refactor_issues-subscription
This commit is contained in:
@@ -2810,3 +2810,19 @@ func (repo *Repository) GetOriginalURLHostname() string {
|
||||
|
||||
return u.Host
|
||||
}
|
||||
|
||||
// GetTreePathLock returns LSF lock for the treePath
|
||||
func (repo *Repository) GetTreePathLock(treePath string) (*LFSLock, error) {
|
||||
if setting.LFS.StartServer {
|
||||
locks, err := GetLFSLockByRepoID(repo.ID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
for _, lock := range locks {
|
||||
if lock.Path == treePath {
|
||||
return lock, nil
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user