Skip to content

Commit 4debf33

Browse files
committed
Rephrase comment after review
Signed-off-by: Xavi Garcia <xavi.garcia@suse.com>
1 parent 4601f8b commit 4debf33

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

internal/cmd/cli/gitcloner/cloner_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,11 @@ func TestCloneRepo_CloneError(t *testing.T) {
379379
}
380380

381381
// initTestRepoWithCommit returns a real go-git repo containing a single
382-
// commit, plus the commit hash. cloneRevision uses ResolveRevision and
383-
// Worktree on the value returned from plainClone, so the mock must hand back
384-
// a populated *git.Repository rather than an empty stub.
382+
// commit, plus the commit hash. A populated *git.Repository is required
383+
// because the full-clone fallback (fullCloneRevision) calls ResolveRevision
384+
// and Worktree on the value returned from plainClone, and because
385+
// TestCloneCommitShallow_Body fetches from it as a source repository; an
386+
// empty stub would not satisfy either.
385387
func initTestRepoWithCommit(t *testing.T) (*git.Repository, plumbing.Hash) {
386388
t.Helper()
387389
tempDir := t.TempDir()

0 commit comments

Comments
 (0)