更改:使用gitcmd保证不会broken
This commit is contained in:
parent
f513d462e5
commit
d70d74a2ae
|
@ -151,7 +151,7 @@ func GetPaginateCodeAuthors(repo *gitea_git.Repository, fromTime time.Time, bran
|
||||||
var authors []*CodeActivityAuthor
|
var authors []*CodeActivityAuthor
|
||||||
since := fromTime.Format(time.RFC3339)
|
since := fromTime.Format(time.RFC3339)
|
||||||
|
|
||||||
authorCmd := gitea_git.NewCommand(repo.Ctx, "log", "--no-merges", "--format=%aN <%aE>", "--date=iso").AddDynamicArguments("--since='%s'", since)
|
authorCmd := gitea_git.NewCommand(repo.Ctx, "log", "--no-merges", "--format=%aN <%aE>", "--date=iso", gitea_git.CmdArg(fmt.Sprintf("--since='%s'", since)))
|
||||||
if len(branch) == 0 {
|
if len(branch) == 0 {
|
||||||
authorCmd.AddArguments("--branches=*")
|
authorCmd.AddArguments("--branches=*")
|
||||||
} else {
|
} else {
|
||||||
|
@ -201,7 +201,7 @@ func GetPaginateCodeAuthors(repo *gitea_git.Repository, fromTime time.Time, bran
|
||||||
_ = stdoutReader.Close()
|
_ = stdoutReader.Close()
|
||||||
_ = stdoutWriter.Close()
|
_ = stdoutWriter.Close()
|
||||||
}()
|
}()
|
||||||
gitCmd := gitea_git.NewCommand(repo.Ctx, "log", "--numstat", "--no-merges", "--pretty=format:---%n%h%n%aN%n%aE%n", "--date=iso", gitea_git.CmdArg(fmt.Sprintf("--author=%s", filterAuthor))).AddDynamicArguments("--since='%s'", since)
|
gitCmd := gitea_git.NewCommand(repo.Ctx, "log", "--numstat", "--no-merges", "--pretty=format:---%n%h%n%aN%n%aE%n", "--date=iso", gitea_git.CmdArg(fmt.Sprintf("--author=%s", filterAuthor)), gitea_git.CmdArg(fmt.Sprintf("--since='%s'", since)))
|
||||||
if len(branch) == 0 {
|
if len(branch) == 0 {
|
||||||
gitCmd.AddArguments("--branches=*")
|
gitCmd.AddArguments("--branches=*")
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue