diff options
Diffstat (limited to 'modules/git/repo.go')
-rw-r--r-- | modules/git/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/git/repo.go b/modules/git/repo.go index 3950bb4a92..b19e80cd44 100644 --- a/modules/git/repo.go +++ b/modules/git/repo.go @@ -386,7 +386,7 @@ type DivergeObject struct { Behind int } -func checkDivergence(repoPath string, baseBranch string, targetBranch string) (int, error) { +func checkDivergence(repoPath, baseBranch, targetBranch string) (int, error) { branches := fmt.Sprintf("%s..%s", baseBranch, targetBranch) cmd := NewCommand("rev-list", "--count", branches) stdout, err := cmd.RunInDir(repoPath) @@ -401,7 +401,7 @@ func checkDivergence(repoPath string, baseBranch string, targetBranch string) (i } // GetDivergingCommits returns the number of commits a targetBranch is ahead or behind a baseBranch -func GetDivergingCommits(repoPath string, baseBranch string, targetBranch string) (DivergeObject, error) { +func GetDivergingCommits(repoPath, baseBranch, targetBranch string) (DivergeObject, error) { // $(git rev-list --count master..feature) commits ahead of master ahead, errorAhead := checkDivergence(repoPath, baseBranch, targetBranch) if errorAhead != nil { |