1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

support ours/theirs merge conflict headers

This commit is contained in:
Jesse Duffield 2019-11-08 09:31:27 +11:00
parent c65790b53d
commit 194c554357

View File

@ -24,7 +24,7 @@ func (gui *Gui) findConflicts(content string) ([]commands.Conflict, error) {
for i, line := range utils.SplitLines(content) {
trimmedLine := strings.TrimPrefix(line, "++")
gui.Log.Info(trimmedLine)
if trimmedLine == "<<<<<<< HEAD" || trimmedLine == "<<<<<<< MERGE_HEAD" || trimmedLine == "<<<<<<< Updated upstream" {
if trimmedLine == "<<<<<<< HEAD" || trimmedLine == "<<<<<<< MERGE_HEAD" || trimmedLine == "<<<<<<< Updated upstream" || trimmedLine == "<<<<<<< ours" {
newConflict = commands.Conflict{Start: i}
} else if trimmedLine == "=======" {
newConflict.Middle = i