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 368B

1234567891011121314151617
  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. package git
  6. func (repo *Repository) getBlob(id SHA1) (*Blob, error) {
  7. if id.IsZero() {
  8. return nil, ErrNotExist{id.String(), ""}
  9. }
  10. return &Blob{
  11. ID: id,
  12. repo: repo,
  13. }, nil
  14. }