MCPcopy Create free account
hub / github.com/remotemobprogramming/mob / cloneRepository

Function cloneRepository

mob_test.go:2389–2404  ·  view source on GitHub ↗
(path, remoteDirectory string)

Source from the content-addressed store, hash-verified

2387}
2388
2389func cloneRepository(path, remoteDirectory string) {
2390 say.Debug("clonerepository: Cloning remote " + remoteDirectory + " to " + path)
2391 err := os.MkdirAll(path, 0755)
2392 if err != nil {
2393 say.Error("Could not create directory " + path)
2394 say.Error(err.Error())
2395 return
2396 }
2397 workingDir = path
2398 name := basename(path)
2399 git("clone", "--origin", "origin", "file://"+remoteDirectory, ".")
2400 git("config", "--local", "user.name", name)
2401 git("config", "--local", "user.email", name+"@example.com")
2402 // see bug #346 changes the output of git status --short
2403 git("config", "--local", "status.branch", "true")
2404}
2405
2406func cloneRepositoryWithSymlink(path, gitDirectory, remoteDirectory string) {
2407 cloneRepository(path, remoteDirectory)

Callers 2

createTestbedInFunction · 0.85

Calls 4

DebugFunction · 0.92
ErrorFunction · 0.92
basenameFunction · 0.85
gitFunction · 0.85

Tested by

no test coverage detected