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

Method UpdateFileAndAdd

pkg/integration/components/shell.go:229–233  ·  view source on GitHub ↗

convenience method for updating a file and adding it

(fileName string, fileContents string)

Source from the content-addressed store, hash-verified

227
228// convenience method for updating a file and adding it
229func (self *Shell) UpdateFileAndAdd(fileName string, fileContents string) *Shell {
230 return self.
231 UpdateFile(fileName, fileContents).
232 GitAdd(fileName)
233}
234
235// convenience method for deleting a file and adding it
236func (self *Shell) DeleteFileAndAdd(fileName string) *Shell {

Calls 2

UpdateFileMethod · 0.95
GitAddMethod · 0.80

Tested by

no test coverage detected