MCPcopy Create free account
hub / github.com/go-git/go-git / createRepository

Function createRepository

_examples/common_test.go:103–114  ·  view source on GitHub ↗
(dir string, isBare bool)

Source from the content-addressed store, hash-verified

101}
102
103func createRepository(dir string, isBare bool) string {
104 var cmd *exec.Cmd
105 if isBare {
106 cmd = exec.Command("git", "init", "--bare", dir)
107 } else {
108 cmd = exec.Command("git", "init", dir)
109 }
110 err := cmd.Run()
111 CheckIfError(err)
112
113 return dir
114}
115
116func createRepositoryWithRemote(local, remote string) string {
117 createRepository(local, false)

Callers 2

createBareRepositoryFunction · 0.85

Calls 2

CheckIfErrorFunction · 0.85
CommandMethod · 0.65

Tested by

no test coverage detected