Skip to content

Commit 74d7c16

Browse files
committed
tests: stop using Repository.Path()
1 parent 1d63286 commit 74d7c16

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

git_sizer_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func newGitBomb(
128128
repo, err = git.NewRepository(path)
129129
require.NoError(t, err)
130130

131-
oid := createObject(t, repo.Path(), "blob", func(w io.Writer) error {
131+
oid := createObject(t, path, "blob", func(w io.Writer) error {
132132
_, err := io.WriteString(w, body)
133133
return err
134134
})
@@ -139,7 +139,7 @@ func newGitBomb(
139139
prefix := "f"
140140

141141
for ; depth > 0; depth-- {
142-
oid = createObject(t, repo.Path(), "tree", func(w io.Writer) error {
142+
oid = createObject(t, path, "tree", func(w io.Writer) error {
143143
for i := 0; i < breadth; i++ {
144144
_, err = fmt.Fprintf(
145145
w, "%s %s%0*d\x00%s",
@@ -156,7 +156,7 @@ func newGitBomb(
156156
prefix = "d"
157157
}
158158

159-
oid = createObject(t, repo.Path(), "commit", func(w io.Writer) error {
159+
oid = createObject(t, path, "commit", func(w io.Writer) error {
160160
_, err := fmt.Fprintf(
161161
w,
162162
"tree %s\n"+
@@ -169,7 +169,7 @@ func newGitBomb(
169169
return err
170170
})
171171

172-
err = updateRef(t, repo.Path(), "refs/heads/master", oid)
172+
err = updateRef(t, path, "refs/heads/master", oid)
173173
require.NoError(t, err)
174174

175175
return repo

0 commit comments

Comments
 (0)