diff options
Diffstat (limited to 'internal/testgit')
| -rw-r--r-- | internal/testgit/command.go | 2 | ||||
| -rw-r--r-- | internal/testgit/tree.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/testgit/command.go b/internal/testgit/command.go index db874bd1..4e696ece 100644 --- a/internal/testgit/command.go +++ b/internal/testgit/command.go @@ -15,7 +15,7 @@ func (repo *Repo) command( ) *exec.Cmd { tb.Helper() - cmd := exec.CommandContext(tb.Context(), command, args...) //nolint:gosec // Test helper runs caller-selected commands. + cmd := exec.CommandContext(tb.Context(), command, args...) //nolint:gosec cmd.Dir = repo.path cmd.Env = repo.env diff --git a/internal/testgit/tree.go b/internal/testgit/tree.go index 501c7949..ff9b1918 100644 --- a/internal/testgit/tree.go +++ b/internal/testgit/tree.go @@ -50,7 +50,7 @@ func (repo *Repo) LsTree(tb testing.TB, oid id.ObjectID) ([]TreeEntry, error) { return nil, fmt.Errorf("ls-tree: %w", err) } - var entries []TreeEntry + entries := make([]TreeEntry, 0, bytes.Count(stdout, []byte{0})) for record := range bytes.SplitSeq(stdout, []byte{0}) { if len(record) == 0 { |
