summaryrefslogtreecommitdiffstats
path: root/modules/git/repo.go
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-12-20 05:41:31 +0100
committerGitHub <noreply@github.com>2021-12-20 04:41:31 +0000
commitff2fd08228dd6323ac4a1cbd2f37f8ae15733eab (patch)
tree9079b869968d358502f64ce03caf4097556c53cd /modules/git/repo.go
parent25677cdc5b11f7100ca2e4b0819e02ca62e22ab1 (diff)
downloadgitea-ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab.tar.gz
gitea-ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab.zip
Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
Diffstat (limited to 'modules/git/repo.go')
-rw-r--r--modules/git/repo.go4
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 {