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

Function createRemoteRepository

mob_test.go:2370–2387  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

2368}
2369
2370func createRemoteRepository(path string) {
2371 branch := "master" // fixed to master for now
2372 say.Debug("createremoterepository: Creating remote repository " + path)
2373 err := os.MkdirAll(path, 0755)
2374 if err != nil {
2375 say.Error("Could not create directory " + path)
2376 say.Error(err.Error())
2377 return
2378 }
2379 workingDir = path
2380 say.Debug("before git init")
2381 git("--bare", "init")
2382 say.Debug("before symbolic-ref")
2383 git("symbolic-ref", "HEAD", "refs/heads/"+branch)
2384 // see bug #346 changes the output of git status --short
2385 git("config", "--local", "status.branch", "true")
2386 say.Debug("finished")
2387}
2388
2389func cloneRepository(path, remoteDirectory string) {
2390 say.Debug("clonerepository: Cloning remote " + remoteDirectory + " to " + path)

Callers 1

createTestbedInFunction · 0.85

Calls 3

DebugFunction · 0.92
ErrorFunction · 0.92
gitFunction · 0.85

Tested by

no test coverage detected