(path, remoteDirectory string)
| 2387 | } |
| 2388 | |
| 2389 | func 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 | |
| 2406 | func cloneRepositoryWithSymlink(path, gitDirectory, remoteDirectory string) { |
| 2407 | cloneRepository(path, remoteDirectory) |
no test coverage detected