code.gitea.io/gitea@v1.19.3/modules/git/repo_blob_nogogit.go (about)

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