gitea源码

repo_blob_nogogit.go 300B

1234567891011121314151617
  1. // Copyright 2020 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. //go:build !gogit
  4. package git
  5. func (repo *Repository) getBlob(id ObjectID) (*Blob, error) {
  6. if id.IsZero() {
  7. return nil, ErrNotExist{id.String(), ""}
  8. }
  9. return &Blob{
  10. ID: id,
  11. repo: repo,
  12. }, nil
  13. }