summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-23 19:53:50 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-23 19:53:50 +0800
commit3d1a967477dd8245dabee6f9f8feb3c1c3924fc3 (patch)
tree90affe09fc04c57c5bd6eaf6d7ee88ee55380eef
parent2dd5259f8e499b0749ecb21faa5e6ad1acb39ff7 (diff)
downloadgitea-3d1a967477dd8245dabee6f9f8feb3c1c3924fc3.tar.gz
gitea-3d1a967477dd8245dabee6f9f8feb3c1c3924fc3.zip
bug fixed
-rw-r--r--models/repo.go7
-rw-r--r--serve.go7
2 files changed, 12 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go
index a37923c8b1..eafb12f471 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -10,6 +10,7 @@ import (
"fmt"
"io/ioutil"
"os"
+ "os/exec"
"path"
"path/filepath"
"regexp"
@@ -198,6 +199,12 @@ func CreateRepository(user *User, repoName, desc, repoLang, license string, priv
return nil, err
}
+ c := exec.Command("git", "update-server-info")
+ err = c.Run()
+ if err != nil {
+ log.Error("repo.CreateRepository(exec update-server-info): %v", err)
+ }
+
return repo, NewRepoAction(user, repo)
}
diff --git a/serve.go b/serve.go
index a8dfe70b4c..ce1dc3184f 100644
--- a/serve.go
+++ b/serve.go
@@ -280,7 +280,10 @@ func runServ(k *cli.Context) {
//fmt.Println("...", cmd)
//runUpdate(k)
- c := exec.Command("exec", "git", "update-server-info")
- c.Run()
+ c := exec.Command("git", "update-server-info")
+ err := c.Run()
+ if err != nil {
+ log.Error("update-server-info: %v", err)
+ }
}
}