MCPcopy Create free account
hub / github.com/jesseduffield/lazygit / CreateNCommitsStartingAt

Method CreateNCommitsStartingAt

pkg/integration/components/shell.go:253–263  ·  view source on GitHub ↗
(n, startIndex int)

Source from the content-addressed store, hash-verified

251}
252
253func (self *Shell) CreateNCommitsStartingAt(n, startIndex int) *Shell {
254 for i := startIndex; i < startIndex+n; i++ {
255 self.CreateFileAndAdd(
256 fmt.Sprintf("file%02d.txt", i),
257 fmt.Sprintf("file%02d content", i),
258 ).
259 Commit(fmt.Sprintf("commit %02d", i))
260 }
261
262 return self
263}
264
265// Only to be used in demos, because the list might change and we don't want
266// tests to break when it does.

Calls 3

CreateFileAndAddMethod · 0.95
CommitMethod · 0.80
SprintfMethod · 0.65

Tested by

no test coverage detected