NewClient creates a new locking client with the given configuration You must call the returned object's `Close` method when you are finished with it
(remote string, lfsClient *lfsapi.Client, cfg *config.Configuration)
| 61 | // You must call the returned object's `Close` method when you are finished with |
| 62 | // it |
| 63 | func NewClient(remote string, lfsClient *lfsapi.Client, cfg *config.Configuration) (*Client, error) { |
| 64 | return &Client{ |
| 65 | Remote: remote, |
| 66 | client: newGenericLockClient(lfsClient), |
| 67 | cache: &nilLockCacher{}, |
| 68 | cfg: cfg, |
| 69 | ModifyIgnoredFiles: lfsClient.GitEnv().Bool("lfs.lockignoredfiles", false), |
| 70 | LocalWorkingDir: cfg.LocalWorkingDir(), |
| 71 | LocalGitDir: cfg.LocalGitDir(), |
| 72 | }, nil |
| 73 | } |
| 74 | |
| 75 | func (c *Client) SetupFileCache(path string) error { |
| 76 | stat, err := os.Stat(path) |