From 54d96c79b5b9f3d5d47aed59729ae779968fbecb Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 23 Jul 2019 20:50:39 +0200 Subject: Removed unnecessary conversions (#7557) No need to convert to the same type. --- modules/git/repo_ref.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/git/repo_ref.go') diff --git a/modules/git/repo_ref.go b/modules/git/repo_ref.go index 95a6c2ae69..9044dbeadd 100644 --- a/modules/git/repo_ref.go +++ b/modules/git/repo_ref.go @@ -34,13 +34,13 @@ func (repo *Repository) GetRefsFiltered(pattern string) ([]*Reference, error) { refType := string(ObjectCommit) if ref.Name().IsTag() { // tags can be of type `commit` (lightweight) or `tag` (annotated) - if tagType, _ := repo.GetTagType(SHA1(ref.Hash())); err == nil { + if tagType, _ := repo.GetTagType(ref.Hash()); err == nil { refType = tagType } } r := &Reference{ Name: ref.Name().String(), - Object: SHA1(ref.Hash()), + Object: ref.Hash(), Type: refType, repo: repo, } -- cgit v1.2.3