diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-07-23 20:50:39 +0200 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-07-23 19:50:39 +0100 |
commit | 54d96c79b5b9f3d5d47aed59729ae779968fbecb (patch) | |
tree | 3d74fa2aecf3a9c5a23a1ec0c7e66fca270216aa /modules/git/parse.go | |
parent | 2f75766532fbf30883c05e93ef01c19268216c45 (diff) | |
download | gitea-54d96c79b5b9f3d5d47aed59729ae779968fbecb.tar.gz gitea-54d96c79b5b9f3d5d47aed59729ae779968fbecb.zip |
Removed unnecessary conversions (#7557)
No need to convert to the same type.
Diffstat (limited to 'modules/git/parse.go')
-rw-r--r-- | modules/git/parse.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/git/parse.go b/modules/git/parse.go index 22861b1d2c..cbd48b9189 100644 --- a/modules/git/parse.go +++ b/modules/git/parse.go @@ -9,7 +9,6 @@ import ( "fmt" "strconv" - "gopkg.in/src-d/go-git.v4/plumbing" "gopkg.in/src-d/go-git.v4/plumbing/filemode" "gopkg.in/src-d/go-git.v4/plumbing/object" ) @@ -57,7 +56,7 @@ func parseTreeEntries(data []byte, ptree *Tree) ([]*TreeEntry, error) { return nil, fmt.Errorf("Invalid ls-tree output: %v", err) } entry.ID = id - entry.gogitTreeEntry.Hash = plumbing.Hash(id) + entry.gogitTreeEntry.Hash = id pos += 41 // skip over sha and trailing space end := pos + bytes.IndexByte(data[pos:], '\n') |