account for filename encoding differences between remotes by normalizing to OS encoding
(s string)
| 1952 | |
| 1953 | // account for filename encoding differences between remotes by normalizing to OS encoding |
| 1954 | func normalizeEncoding(s string) string { |
| 1955 | if s == "" || s == "." { |
| 1956 | return s |
| 1957 | } |
| 1958 | nameVal, err := strconv.Unquote(s) |
| 1959 | if err != nil { |
| 1960 | nameVal = s |
| 1961 | } |
| 1962 | nameVal = filepath.Clean(nameVal) |
| 1963 | nameVal = encoder.OS.FromStandardPath(nameVal) |
| 1964 | return strconv.Quote(encoder.OS.ToStandardPath(filepath.ToSlash(nameVal))) |
| 1965 | } |
| 1966 | |
| 1967 | func stringToHash(s string) string { |
| 1968 | ht := hash.MD5 |
no test coverage detected
searching dependent graphs…