MCPcopy
hub / github.com/git-lfs/git-lfs / ResolveSymlinks

Function ResolveSymlinks

tools/filetools.go:58–67  ·  view source on GitHub ↗

ResolveSymlinks ensures that if the path supplied is a symlink, it is resolved to the actual concrete path

(path string)

Source from the content-addressed store, hash-verified

56// ResolveSymlinks ensures that if the path supplied is a symlink, it is
57// resolved to the actual concrete path
58func ResolveSymlinks(path string) string {
59 if len(path) == 0 {
60 return path
61 }
62
63 if resolved, err := CanonicalizeSystemPath(path); err == nil {
64 return resolved
65 }
66 return path
67}
68
69// RenameFileCopyPermissions moves srcfile to destfile, replacing destfile if
70// necessary and also copying the permissions of destfile if it already exists

Callers 5

ConvertMethod · 0.92
pathConverterArgsFunction · 0.92
trackCommandFunction · 0.92
statusCommandFunction · 0.92
loadGitDirsMethod · 0.92

Calls 1

CanonicalizeSystemPathFunction · 0.70

Tested by

no test coverage detected