aboutsummaryrefslogtreecommitdiff
path: root/serve.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-22 00:50:47 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-22 00:50:47 +0800
commit17da2fd2e30e85909394bc58069ecab14d8d8577 (patch)
treed80e786818d20aed12b7a84f6a9961468a7f70ec /serve.go
parentefdaf6ee1536f043d9e242dc16a096c99ec1bfda (diff)
parentf219ddcf4ef13b9d5de129da4eb2b56dbc899d61 (diff)
merged
Diffstat (limited to 'serve.go')
-rw-r--r--serve.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/serve.go b/serve.go
index ddc67023..3ce8f904 100644
--- a/serve.go
+++ b/serve.go
@@ -12,7 +12,9 @@ import (
"strings"
"github.com/codegangsta/cli"
+
"github.com/gogits/gogs/models"
+ "github.com/gogits/gogs/modules/base"
)
var (
@@ -43,6 +45,10 @@ func In(b string, sl map[string]int) bool {
}
func runServ(*cli.Context) {
+ base.NewConfigContext()
+ models.LoadModelsConfig()
+ models.NewEngine()
+
keys := strings.Split(os.Args[2], "-")
if len(keys) != 2 {
fmt.Println("auth file format error")
@@ -144,7 +150,7 @@ func runServ(*cli.Context) {
}
gitcmd := exec.Command(verb, rRepo)
- gitcmd.Dir = models.RepoRootPath
+ gitcmd.Dir = base.RepoRootPath
gitcmd.Stdout = os.Stdout
gitcmd.Stdin = os.Stdin
gitcmd.Stderr = os.Stderr