MCPcopy Create free account
hub / github.com/cli/cli / isGitPathFile

Function isGitPathFile

script/ghmock/gitfixture.go:198–207  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

196}
197
198func 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
209func copyGitPathFile(sourceFile, destinationFile, source, destination string, mode fs.FileMode) error {
210 if strings.HasSuffix(filepath.ToSlash(sourceFile), "/objects/info/alternates") {

Callers 2

writeTarGzipFunction · 0.85
copyGitTreeFunction · 0.85

Calls 2

BaseMethod · 0.80
ContainsMethod · 0.80

Tested by

no test coverage detected