mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-22 17:48:23 +08:00
alternative to PR "improve code quality" (#21464)
This PR doesn't require new git version, and can be backported easily. Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@ -166,7 +166,7 @@ func AllCommitsCount(ctx context.Context, repoPath string, hidePRRefs bool, file
|
||||
// CommitsCountFiles returns number of total commits of until given revision.
|
||||
func CommitsCountFiles(ctx context.Context, repoPath string, revision, relpath []string) (int64, error) {
|
||||
cmd := NewCommand(ctx, "rev-list", "--count")
|
||||
cmd.AddArguments(revision...)
|
||||
cmd.AddDynamicArguments(revision...)
|
||||
if len(relpath) > 0 {
|
||||
cmd.AddArguments("--")
|
||||
cmd.AddArguments(relpath...)
|
||||
|
Reference in New Issue
Block a user