diff options
Diffstat (limited to 'repository')
-rw-r--r-- | repository/git.go | 12 | ||||
-rw-r--r-- | repository/repo.go | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/repository/git.go b/repository/git.go index c5dc5618..9b5aebb5 100644 --- a/repository/git.go +++ b/repository/git.go @@ -248,13 +248,13 @@ func (repo *GitRepo) ListRefs(refspec string) ([]string, error) { return nil, err } - splitted := strings.Split(stdout, "\n") + split := strings.Split(stdout, "\n") - if len(splitted) == 1 && splitted[0] == "" { + if len(split) == 1 && split[0] == "" { return []string{}, nil } - return splitted, nil + return split, nil } // RefExist will check if a reference exist in Git @@ -283,10 +283,10 @@ func (repo *GitRepo) ListCommits(ref string) ([]util.Hash, error) { return nil, err } - splitted := strings.Split(stdout, "\n") + split := strings.Split(stdout, "\n") - casted := make([]util.Hash, len(splitted)) - for i, line := range splitted { + casted := make([]util.Hash, len(split)) + for i, line := range split { casted[i] = util.Hash(line) } diff --git a/repository/repo.go b/repository/repo.go index faea9f16..355c4cf9 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -91,10 +91,10 @@ func prepareTreeEntries(entries []TreeEntry) bytes.Buffer { } func readTreeEntries(s string) ([]TreeEntry, error) { - splitted := strings.Split(s, "\n") + split := strings.Split(s, "\n") - casted := make([]TreeEntry, len(splitted)) - for i, line := range splitted { + casted := make([]TreeEntry, len(split)) + for i, line := range split { if line == "" { continue } |