mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 04:14:01 +01:00 
			
		
		
		
	debug
This commit is contained in:
		
							parent
							
								
									a686188140
								
							
						
					
					
						commit
						0aa7967488
					
				@ -24,7 +24,7 @@ type Blob struct {
 | 
			
		||||
// DataAsync gets a ReadCloser for the contents of a blob without reading it all.
 | 
			
		||||
// Calling the Close function on the result will discard all unread output.
 | 
			
		||||
func (b *Blob) DataAsync() (_ io.ReadCloser, retErr error) {
 | 
			
		||||
	batch, cancel, err := b.repo.CatFileBatch(b.repo.Ctx, true)
 | 
			
		||||
	batch, cancel, err := b.repo.CatFileBatch(b.repo.Ctx, true) // not related
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
@ -57,7 +57,7 @@ func (b *Blob) Size() int64 {
 | 
			
		||||
		return b.size
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	batch, cancel, err := b.repo.CatFileBatch(b.repo.Ctx, true)
 | 
			
		||||
	batch, cancel, err := b.repo.CatFileBatch(b.repo.Ctx, true) // not related
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Debug("error whilst reading size for %s in %s. Error: %v", b.ID.String(), b.repo.Path, err)
 | 
			
		||||
		return 0
 | 
			
		||||
 | 
			
		||||
@ -23,7 +23,7 @@ func (repo *Repository) IsObjectExist(name string) bool {
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx, true)
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx, true) // not related
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Debug("Error writing to CatFileBatchCheck %v", err)
 | 
			
		||||
		return false
 | 
			
		||||
@ -44,7 +44,7 @@ func (repo *Repository) IsReferenceExist(name string) bool {
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx, true)
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx, true) // not related
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Debug("Error writing to CatFileBatchCheck %v", err)
 | 
			
		||||
		return false
 | 
			
		||||
 | 
			
		||||
@ -36,7 +36,7 @@ func (repo *Repository) ResolveReference(name string) (string, error) {
 | 
			
		||||
 | 
			
		||||
// GetRefCommitID returns the last commit ID string of given reference (branch or tag).
 | 
			
		||||
func (repo *Repository) GetRefCommitID(name string) (string, error) {
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx)
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx, true)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
@ -67,7 +67,7 @@ func (repo *Repository) IsCommitExist(name string) bool {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (repo *Repository) getCommit(id ObjectID) (*Commit, error) {
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx)
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx, true)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
@ -151,7 +151,7 @@ func (repo *Repository) ConvertToGitID(commitID string) (ObjectID, error) {
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx)
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx, true)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,7 @@ import (
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func (repo *Repository) getTree(id ObjectID) (*Tree, error) {
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx)
 | 
			
		||||
	batch, cancel, err := repo.CatFileBatch(repo.Ctx, true)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -36,7 +36,7 @@ func (te *TreeEntry) Size() int64 {
 | 
			
		||||
		return te.size
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	batch, cancel, err := te.ptree.repo.CatFileBatch(te.ptree.repo.Ctx)
 | 
			
		||||
	batch, cancel, err := te.ptree.repo.CatFileBatch(te.ptree.repo.Ctx, true)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Debug("error whilst reading size for %s in %s. Error: %v", te.ID.String(), te.ptree.repo.Path, err)
 | 
			
		||||
		return 0
 | 
			
		||||
 | 
			
		||||
@ -35,7 +35,7 @@ func (t *Tree) ListEntries() (Entries, error) {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if t.repo != nil {
 | 
			
		||||
		batch, cancel, err := t.repo.CatFileBatch(t.repo.Ctx)
 | 
			
		||||
		batch, cancel, err := t.repo.CatFileBatch(t.repo.Ctx, true)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return nil, err
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user