MCPcopy
hub / github.com/jesseduffield/lazygit / CreateFileAndAdd

Method CreateFileAndAdd

pkg/integration/components/shell.go:222–226  ·  view source on GitHub ↗

convenience method for creating a file and adding it

(fileName string, fileContents string)

Source from the content-addressed store, hash-verified

220
221// convenience method for creating a file and adding it
222func (self *Shell) CreateFileAndAdd(fileName string, fileContents string) *Shell {
223 return self.
224 CreateFile(fileName, fileContents).
225 GitAdd(fileName)
226}
227
228// convenience method for updating a file and adding it
229func (self *Shell) UpdateFileAndAdd(fileName string, fileContents string) *Shell {

Calls 2

CreateFileMethod · 0.95
GitAddMethod · 0.80

Tested by

no test coverage detected