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

Function computeLockData

commands/command_lock.go:82–95  ·  view source on GitHub ↗

computeLockData computes data about the given repository and working directory to use in lockPath.

()

Source from the content-addressed store, hash-verified

80// computeLockData computes data about the given repository and working
81// directory to use in lockPath.
82func computeLockData() (*lockData, error) {
83 wd, err := tools.Getwd()
84 if err != nil {
85 return nil, err
86 }
87 wd, err = tools.CanonicalizeSystemPath(wd)
88 if err != nil {
89 return nil, err
90 }
91 return &lockData{
92 rootDir: cfg.LocalWorkingDir(),
93 workingDir: wd,
94 }, nil
95}
96
97// lockPath relativizes the given filepath such that it is relative to the root
98// path of the repository it is contained within, taking into account the

Callers 3

locksCommandFunction · 0.85
lockCommandFunction · 0.85
unlockCommandFunction · 0.85

Calls 3

GetwdFunction · 0.92
CanonicalizeSystemPathFunction · 0.92
LocalWorkingDirMethod · 0.80

Tested by

no test coverage detected