From 00790151025ad58a0bf2b0913c5dd4983fc65b24 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 3 Mar 2019 15:55:19 +1100 Subject: distinguish between inline and non-inline merge conflicts --- pkg/commands/file.go | 17 +++++++++-------- pkg/commands/git.go | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'pkg/commands') diff --git a/pkg/commands/file.go b/pkg/commands/file.go index 3a5073af4..39d989634 100644 --- a/pkg/commands/file.go +++ b/pkg/commands/file.go @@ -5,14 +5,15 @@ import "github.com/fatih/color" // File : A file from git status // duplicating this for now type File struct { - Name string - HasStagedChanges bool - HasUnstagedChanges bool - Tracked bool - Deleted bool - HasMergeConflicts bool - DisplayString string - Type string // one of 'file', 'directory', and 'other' + Name string + HasStagedChanges bool + HasUnstagedChanges bool + Tracked bool + Deleted bool + HasMergeConflicts bool + HasInlineMergeConflicts bool + DisplayString string + Type string // one of 'file', 'directory', and 'other' } // GetDisplayStrings returns the display string of a file diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 0e78f3f6b..43f78a28f 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -150,14 +150,15 @@ func (c *GitCommand) GetStatusFiles() []*File { _, hasNoStagedChanges := map[string]bool{" ": true, "U": true, "?": true}[stagedChange] file := &File{ - Name: filename, - DisplayString: statusString, - HasStagedChanges: !hasNoStagedChanges, - HasUnstagedChanges: unstagedChange != " ", - Tracked: !untracked, - Deleted: unstagedChange == "D" || stagedChange == "D", - HasMergeConflicts: change == "UU" || change == "AA" || change == "DU", - Type: c.OSCommand.FileType(filename), + Name: filename, + DisplayString: statusString, + HasStagedChanges: !hasNoStagedChanges, + HasUnstagedChanges: unstagedChange != " ", + Tracked: !untracked, + Deleted: unstagedChange == "D" || stagedChange == "D", + HasMergeConflicts: change == "UU" || change == "AA" || change == "DU", + HasInlineMergeConflicts: change == "UU" || change == "AA", + Type: c.OSCommand.FileType(filename), } files = append(files, file) } -- cgit v1.2.3