MCPcopy Create free account
hub / github.com/git-bug/git-bug / TestGoGit_DetectsSubmodules

Function TestGoGit_DetectsSubmodules

repository/gogit_test.go:87–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

85}
86
87func TestGoGit_DetectsSubmodules(t *testing.T) {
88 repo := CreateGoGitTestRepo(t, false)
89 expected := filepath.Join(goGitRepoDir(t, repo), "/.git")
90
91 d := t.TempDir()
92 err := os.WriteFile(filepath.Join(d, ".git"), []byte(fmt.Sprintf("gitdir: %s", expected)), 0600)
93 require.NoError(t, err)
94
95 result, err := detectGitPath(d, 0)
96 assert.Empty(t, err)
97 assert.Equal(t, expected, result)
98}

Callers

nothing calls this directly

Calls 3

CreateGoGitTestRepoFunction · 0.85
goGitRepoDirFunction · 0.85
detectGitPathFunction · 0.85

Tested by

no test coverage detected