(path string)
| 196 | } |
| 197 | |
| 198 | func isGitPathFile(path string) bool { |
| 199 | if strings.HasSuffix(path, "/objects/info/alternates") { |
| 200 | return true |
| 201 | } |
| 202 | if filepath.Base(path) == ".git" { |
| 203 | return true |
| 204 | } |
| 205 | return strings.Contains(path, ".git/worktrees/") && |
| 206 | (filepath.Base(path) == "gitdir" || filepath.Base(path) == "commondir") |
| 207 | } |
| 208 | |
| 209 | func copyGitPathFile(sourceFile, destinationFile, source, destination string, mode fs.FileMode) error { |
| 210 | if strings.HasSuffix(filepath.ToSlash(sourceFile), "/objects/info/alternates") { |
no test coverage detected