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

Method RandomChangeCommit

pkg/integration/components/shell.go:349–355  ·  view source on GitHub ↗

Creates a commit with a random file Only to be used in demos

(message string)

Source from the content-addressed store, hash-verified

347// Creates a commit with a random file
348// Only to be used in demos
349func (self *Shell) RandomChangeCommit(message string) *Shell {
350 index := self.randomFileContentIndex
351 self.randomFileContentIndex++
352 randomFileName := fmt.Sprintf("random-%d.go", index)
353 self.CreateFileAndAdd(randomFileName, RandomFileContents[index%len(RandomFileContents)])
354 return self.Commit(message)
355}
356
357func (self *Shell) SetConfig(key string, value string) *Shell {
358 self.RunCommand([]string{"git", "config", "--local", key, value})

Callers 1

rebase_onto.goFile · 0.80

Calls 3

CreateFileAndAddMethod · 0.95
CommitMethod · 0.95
SprintfMethod · 0.65

Tested by

no test coverage detected