MCPcopy Index your code
hub / github.com/jesseduffield/lazygit / addFileWhole

Method addFileWhole

pkg/commands/patch/patch_builder.go:87–98  ·  view source on GitHub ↗
(info *fileInfo)

Source from the content-addressed store, hash-verified

85}
86
87func (p *PatchBuilder) addFileWhole(info *fileInfo) {
88 if info.mode != WHOLE {
89 info.mode = WHOLE
90 lineCount := len(strings.Split(info.diff, "\n"))
91 // add every line index
92 // TODO: add tests and then use lo.Range to simplify
93 info.includedLineIndices = make([]int, lineCount)
94 for i := range lineCount {
95 info.includedLineIndices[i] = i
96 }
97 }
98}
99
100func (p *PatchBuilder) removeFile(info *fileInfo) {
101 info.mode = UNSELECTED

Callers 1

AddFileWholeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected