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

Function WriteRebaseTodoFile

pkg/utils/rebase_todo.go:85–96  ·  view source on GitHub ↗
(fileName string, todos []todo.Todo, commentChar byte)

Source from the content-addressed store, hash-verified

83}
84
85func WriteRebaseTodoFile(fileName string, todos []todo.Todo, commentChar byte) error {
86 f, err := os.Create(fileName)
87 if err != nil {
88 return err
89 }
90 err = todo.Write(f, todos, commentChar)
91 err2 := f.Close()
92 if err == nil {
93 err = err2
94 }
95 return err
96}
97
98func todosToString(todos []todo.Todo, commentChar byte) ([]byte, error) {
99 buffer := bytes.Buffer{}

Callers 6

EditRebaseTodoFunction · 0.85
MoveTodosDownFunction · 0.85
MoveTodosUpFunction · 0.85
MoveFixupCommitDownFunction · 0.85
DropMergeCommitFunction · 0.85

Calls 3

CreateMethod · 0.45
WriteMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected