diff --git a/routers/repo/view.go b/routers/repo/view.go index 087b75f55..98a4d5753 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -363,7 +363,7 @@ func gitcmd(ctx *middleware.Context, args ...string) (string, error) { return stdout, nil } func gitcatfile(ctx *middleware.Context, hash string) ([]byte, error) { - git := exec.Command("git", "cat-file blob"+hash) + git := exec.Command("git", "cat-file", "blob", hash) git.Dir = ctx.Repo.GitRepo.Path stdout, err := git.StdoutPipe() if err != nil {