(path, gitDirectory, remoteDirectory string)
| 2404 | } |
| 2405 | |
| 2406 | func cloneRepositoryWithSymlink(path, gitDirectory, remoteDirectory string) { |
| 2407 | cloneRepository(path, remoteDirectory) |
| 2408 | say.Debug(fmt.Sprintf("clonerepositorywithsymlink: move .git to %s and create symlink to it", gitDirectory)) |
| 2409 | err := os.Rename(filepath.FromSlash(path+"/.git"), gitDirectory) |
| 2410 | if err != nil { |
| 2411 | say.Error("Could not move directory " + path + " to " + gitDirectory) |
| 2412 | say.Error(err.Error()) |
| 2413 | return |
| 2414 | } |
| 2415 | err = os.Symlink(gitDirectory, filepath.FromSlash(path+"/.git")) |
| 2416 | if err != nil { |
| 2417 | say.Error("Could not create symlink from " + gitDirectory + " to " + path + "/.git") |
| 2418 | say.Error(err.Error()) |
| 2419 | return |
| 2420 | } |
| 2421 | } |
| 2422 | |
| 2423 | func cleanRepositoryWithSymlink(path, gitDirectory string) { |
| 2424 | cleanRepository(path) |
no test coverage detected