There was an error while loading. Please reload this page.
1 parent 0614f05 commit 01a70e0Copy full SHA for 01a70e0
1 file changed
kittens/diff/patch.go
@@ -461,8 +461,8 @@ func is_non_blank(text string) bool {
461
462
func (self *Patch) detect_moved_lines(left_lines, right_lines []string) {
463
// Build maps from line text to lists of line numbers for removed and added lines.
464
- removed := make(map[string][]int) // text -> left line numbers
465
- added := make(map[string][]int) // text -> right line numbers
+ removed := make(map[string][]int, len(left_lines)) // text -> left line numbers
+ added := make(map[string][]int, len(right_lines)) // text -> right line numbers
466
for _, hunk := range self.all_hunks {
467
for _, chunk := range hunk.chunks {
468
if !chunk.is_context {
0 commit comments