Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
This commit is contained in:
parent
25677cdc5b
commit
ff2fd08228
59 changed files with 115 additions and 116 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue