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.

repo_blob_nogogit.go 385B

123456789101112131415161718
  1. // Copyright 2020 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. //go:build !gogit
  5. // +build !gogit
  6. package git
  7. func (repo *Repository) getBlob(id SHA1) (*Blob, error) {
  8. if id.IsZero() {
  9. return nil, ErrNotExist{id.String(), ""}
  10. }
  11. return &Blob{
  12. ID: id,
  13. repo: repo,
  14. }, nil
  15. }