summaryrefslogtreecommitdiffstats
path: root/modules/git/repo_ref.go
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-07-23 20:50:39 +0200
committerzeripath <art27@cantab.net>2019-07-23 20:50:39 +0200
commit54d96c79b5b9f3d5d47aed59729ae779968fbecb (patch)
tree3d74fa2aecf3a9c5a23a1ec0c7e66fca270216aa /modules/git/repo_ref.go
parentHandle ErrUserProhibitLogin in http git (#7586) (diff)
downloadforgejo-54d96c79b5b9f3d5d47aed59729ae779968fbecb.tar.xz
forgejo-54d96c79b5b9f3d5d47aed59729ae779968fbecb.zip
Removed unnecessary conversions (#7557)
No need to convert to the same type.
Diffstat (limited to 'modules/git/repo_ref.go')
-rw-r--r--modules/git/repo_ref.go4
1 files changed, 2 insertions, 2 deletions
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,
}