1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add flash

This commit is contained in:
Unknown
2014-04-10 16:36:50 -04:00
parent 459223cf01
commit 45462662e9
17 changed files with 179 additions and 129 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
}