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

Method fixFileWriteFlags

locking/lockable.go:113–129  ·  view source on GitHub ↗

Internal implementation of fixing file write flags with precompiled filters

(absPath, workingDir string, lockable, unlockable *filepathfilter.Filter)

Source from the content-addressed store, hash-verified

111
112// Internal implementation of fixing file write flags with precompiled filters
113func (c *Client) fixFileWriteFlags(absPath, workingDir string, lockable, unlockable *filepathfilter.Filter) error {
114
115 // Build a list of files
116 lsFiles, err := git.NewLsFiles(workingDir, !c.ModifyIgnoredFiles, false)
117 if err != nil {
118 return err
119 }
120
121 for f := range lsFiles.Files {
122 err = c.fixSingleFileWriteFlags(f, lockable, unlockable)
123 if err != nil {
124 return err
125 }
126 }
127
128 return nil
129}
130
131// FixLockableFileWriteFlags checks each file in the provided list, and for
132// those which are lockable, makes sure their write flags are set correctly

Callers 2

Calls 2

NewLsFilesFunction · 0.92

Tested by

no test coverage detected