aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_base_gogit.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_base_gogit.go')
-rw-r--r--modules/git/repo_base_gogit.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/git/repo_base_gogit.go b/modules/git/repo_base_gogit.go
index 3ca5eb36c6..0cd07dcdc8 100644
--- a/modules/git/repo_base_gogit.go
+++ b/modules/git/repo_base_gogit.go
@@ -8,11 +8,11 @@ package git
import (
"context"
- "errors"
"path/filepath"
gitealog "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/util"
"github.com/go-git/go-billy/v5"
"github.com/go-git/go-billy/v5/osfs"
@@ -52,7 +52,7 @@ func OpenRepository(ctx context.Context, repoPath string) (*Repository, error) {
if err != nil {
return nil, err
} else if !isDir(repoPath) {
- return nil, errors.New("no such file or directory")
+ return nil, util.NewNotExistErrorf("no such file or directory")
}
fs := osfs.New(repoPath)