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

Function Getwd

tools/os_tools.go:14–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12)
13
14func Getwd() (dir string, err error) {
15 dir, err = os.Getwd()
16 if err != nil {
17 return
18 }
19
20 if isCygwin() {
21 dir, err = translateCygwinPath(dir)
22 if err != nil {
23 return "", errors.Wrap(err, tr.Tr.Get("error converting working directory to Cygwin"))
24 }
25 }
26
27 return
28}
29
30func translateCygwinPath(path string) (string, error) {
31 cmd, err := subprocess.ExecCommand("cygpath", "-w", path)

Callers 5

computeLockDataFunction · 0.92
changeToWorkingCopyFunction · 0.92
trackCommandFunction · 0.92
cloneCommandFunction · 0.92
TestCloneFileFunction · 0.85

Calls 3

translateCygwinPathFunction · 0.85
isCygwinFunction · 0.70
GetMethod · 0.65

Tested by 1

TestCloneFileFunction · 0.68