Merge branch 'dev' of github.com:gogits/gogs into dev

This commit is contained in:
Lunny Xiao 2014-04-11 10:28:23 +08:00
commit 8cfa2be433
33 changed files with 398 additions and 268 deletions

View file

@ -14,6 +14,8 @@ import (
"path"
"strings"
"github.com/Unknwon/com"
"github.com/gogits/git"
"github.com/gogits/gogs/modules/base"
@ -163,13 +165,11 @@ func getReposFiles(userName, repoName, commitId string, rpath string) ([]*RepoFi
return 0
}
cmd := exec.Command("git", "log", "-1", "--pretty=format:%H", commitId, "--", path.Join(dirname, entry.Name))
cmd.Dir = repopath
out, err := cmd.Output()
stdout, _, err := com.ExecCmdDir(repopath, "git", "log", "-1", "--pretty=format:%H", commitId, "--", path.Join(dirname, entry.Name))
if err != nil {
return 0
}
filecm, err := repo.GetCommit(string(out))
filecm, err := repo.GetCommit(string(stdout))
if err != nil {
return 0
}

View file

@ -80,6 +80,7 @@ type Repository struct {
IsPrivate bool
IsBare bool
IsGoget bool
DefaultBranch string
Created time.Time `xorm:"created"`
Updated time.Time `xorm:"updated"`
}