Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

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. }