mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Handle alternate merge conflict format; add tests
This commit is contained in:
committed by
Jesse Duffield
parent
44f7fc6f7c
commit
e478c254d4
@ -104,6 +104,10 @@ func findConflicts(content string) []*mergeConflict {
|
||||
case "=======":
|
||||
newConflict.middle = i
|
||||
default:
|
||||
// Sometimes these lines look like "<<<<<<< HEAD:foo/bar/baz.go" so handle that case as well.
|
||||
if strings.HasPrefix(trimmedLine, "<<<<<<< HEAD:") {
|
||||
newConflict = &mergeConflict{start: i}
|
||||
}
|
||||
if strings.HasPrefix(trimmedLine, ">>>>>>> ") {
|
||||
newConflict.end = i
|
||||
conflicts = append(conflicts, newConflict)
|
||||
|
Reference in New Issue
Block a user