mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
move out git module and #1573 send push hook
This commit is contained in:
parent
bd5dc626e8
commit
9a2e43bff2
45 changed files with 185 additions and 2002 deletions
|
@ -5,8 +5,9 @@
|
|||
package repo
|
||||
|
||||
import (
|
||||
"github.com/gogits/git-shell"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/modules/git"
|
||||
"github.com/gogits/gogs/modules/middleware"
|
||||
"github.com/gogits/gogs/routers/repo"
|
||||
)
|
||||
|
@ -20,7 +21,7 @@ func GetRawFile(ctx *middleware.Context) {
|
|||
|
||||
blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreeName)
|
||||
if err != nil {
|
||||
if err == git.ErrNotExist {
|
||||
if git.IsErrNotExist(err) {
|
||||
ctx.Error(404)
|
||||
} else {
|
||||
ctx.APIError(500, "GetBlobByPath", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue