aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git')
-rw-r--r--modules/git/repo.go4
-rw-r--r--modules/git/repo_commit.go4
-rw-r--r--modules/git/repo_compare.go2
-rw-r--r--modules/git/repo_tree.go2
-rw-r--r--modules/git/utils.go2
5 files changed, 7 insertions, 7 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 {
diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go
index 3afabac27b..896ad34518 100644
--- a/modules/git/repo_commit.go
+++ b/modules/git/repo_commit.go
@@ -264,7 +264,7 @@ func (repo *Repository) FilesCountBetween(startCommitID, endCommitID string) (in
// CommitsBetween returns a list that contains commits between [before, last).
// If before is detached (removed by reset + push) it is not included.
-func (repo *Repository) CommitsBetween(last *Commit, before *Commit) ([]*Commit, error) {
+func (repo *Repository) CommitsBetween(last, before *Commit) ([]*Commit, error) {
var stdout []byte
var err error
if before == nil {
@@ -284,7 +284,7 @@ func (repo *Repository) CommitsBetween(last *Commit, before *Commit) ([]*Commit,
}
// CommitsBetweenLimit returns a list that contains at most limit commits skipping the first skip commits between [before, last)
-func (repo *Repository) CommitsBetweenLimit(last *Commit, before *Commit, limit, skip int) ([]*Commit, error) {
+func (repo *Repository) CommitsBetweenLimit(last, before *Commit, limit, skip int) ([]*Commit, error) {
var stdout []byte
var err error
if before == nil {
diff --git a/modules/git/repo_compare.go b/modules/git/repo_compare.go
index 5fe37aed7b..992a70733b 100644
--- a/modules/git/repo_compare.go
+++ b/modules/git/repo_compare.go
@@ -27,7 +27,7 @@ type CompareInfo struct {
}
// GetMergeBase checks and returns merge base of two branches and the reference used as base.
-func (repo *Repository) GetMergeBase(tmpRemote string, base, head string) (string, string, error) {
+func (repo *Repository) GetMergeBase(tmpRemote, base, head string) (string, string, error) {
if tmpRemote == "" {
tmpRemote = "origin"
}
diff --git a/modules/git/repo_tree.go b/modules/git/repo_tree.go
index f57c26ffee..79d31b62b5 100644
--- a/modules/git/repo_tree.go
+++ b/modules/git/repo_tree.go
@@ -23,7 +23,7 @@ type CommitTreeOpts struct {
}
// CommitTree creates a commit from a given tree id for the user with provided message
-func (repo *Repository) CommitTree(author *Signature, committer *Signature, tree *Tree, opts CommitTreeOpts) (SHA1, error) {
+func (repo *Repository) CommitTree(author, committer *Signature, tree *Tree, opts CommitTreeOpts) (SHA1, error) {
err := LoadGitVersion()
if err != nil {
return SHA1{}, err
diff --git a/modules/git/utils.go b/modules/git/utils.go
index 6988f31a36..53c124ac8a 100644
--- a/modules/git/utils.go
+++ b/modules/git/utils.go
@@ -125,7 +125,7 @@ func SplitRefName(refStr string) (string, string) {
// 0 is false, true
// Any other integer is true, true
// Anything else will return false, false
-func ParseBool(value string) (result bool, valid bool) {
+func ParseBool(value string) (result, valid bool) {
// Empty strings are true but invalid
if len(value) == 0 {
return true, false