File tree Expand file tree Collapse file tree
internal/cmd/cli/gitcloner Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
385387func initTestRepoWithCommit (t * testing.T ) (* git.Repository , plumbing.Hash ) {
386388 t .Helper ()
387389 tempDir := t .TempDir ()
You can’t perform that action at this time.
0 commit comments