MCPcopy Index your code
hub / github.com/go-git/go-git / createRepository

Function createRepository

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

Source from the content-addressed store, hash-verified

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

Callers 2

createBareRepositoryFunction · 0.85

Calls 2

CheckIfErrorFunction · 0.85
CommandMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…