MCPcopy Create free account
hub / github.com/cli/cli / ensureGitFixture

Method ensureGitFixture

script/ghmock/gitfixture.go:55–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53}
54
55func (s *state) ensureGitFixture() (string, error) {
56 dir := s.gitFixtureDir()
57 for _, name := range []string{"work", "repos"} {
58 if err := os.MkdirAll(filepath.Join(dir, name), 0o755); err != nil {
59 return "", err
60 }
61 }
62 return filepath.EvalSymlinks(dir)
63}
64
65func (s *state) snapshotGit(runID, in string) (string, error) {
66 _, err := os.Stat(s.gitFixtureDir())

Callers 4

gitWorldMethod · 0.95
TestCmdWriteFunction · 0.80
cmdRepoFunction · 0.80
cmdWriteFunction · 0.80

Calls 3

gitFixtureDirMethod · 0.95
MkdirAllMethod · 0.80
JoinMethod · 0.80

Tested by 1

TestCmdWriteFunction · 0.64