You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ref.go 469B

123456789101112131415161718
  1. // Copyright 2018 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package git
  5. // Reference represents a Git ref.
  6. type Reference struct {
  7. Name string
  8. repo *Repository
  9. Object SHA1 // The id of this commit object
  10. Type string
  11. }
  12. // Commit return the commit of the reference
  13. func (ref *Reference) Commit() (*Commit, error) {
  14. return ref.repo.getCommit(ref.Object)
  15. }