mirror of
https://github.com/go-gitea/gitea
synced 2025-01-02 15:25:59 +01:00
some fixes
This commit is contained in:
parent
c7359599c7
commit
b4306dec58
@ -7,6 +7,7 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/go-git/go-git/v5/plumbing"
|
||||
@ -57,7 +58,7 @@ func (t *Tree) ListEntries() (Entries, error) {
|
||||
}
|
||||
|
||||
// ListEntriesRecursiveWithSize returns all entries of current tree recursively including all subtrees
|
||||
func (t *Tree) ListEntriesRecursiveWithSize() (Entries, error) {
|
||||
func (t *Tree) ListEntriesRecursiveWithSize(ctx context.Context) (Entries, error) {
|
||||
if t.gogitTree == nil {
|
||||
err := t.loadTreeObject()
|
||||
if err != nil {
|
||||
@ -93,6 +94,6 @@ func (t *Tree) ListEntriesRecursiveWithSize() (Entries, error) {
|
||||
}
|
||||
|
||||
// ListEntriesRecursiveFast is the alias of ListEntriesRecursiveWithSize for the gogit version
|
||||
func (t *Tree) ListEntriesRecursiveFast() (Entries, error) {
|
||||
return t.ListEntriesRecursiveWithSize()
|
||||
func (t *Tree) ListEntriesRecursiveFast(ctx context.Context) (Entries, error) {
|
||||
return t.ListEntriesRecursiveWithSize(ctx)
|
||||
}
|
||||
|
@ -105,9 +105,6 @@ func (t *Tree) listEntriesRecursive(ctx context.Context, extraArgs TrustedCmdArg
|
||||
t.entriesRecursive = append(t.entriesRecursive, entry)
|
||||
return nil
|
||||
}, extraArgs)
|
||||
if err == nil {
|
||||
t.entriesRecursiveParsed = true
|
||||
}
|
||||
return t.entriesRecursive, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user