477 Remove unnecessary variable check

hasInlineMergeConflicts is always true with hasMergeConflicts is true
This commit is contained in:
Giorgio Previtera 2019-07-14 11:29:36 +01:00 committed by Jesse Duffield
parent e83ef9858b
commit 827837b0b9
2 changed files with 1 additions and 28 deletions

View file

@ -1347,33 +1347,6 @@ func TestGitCommandDiscardAllFileChanges(t *testing.T) {
return nil
},
},
{
"Reset and checkout inline merge conflicts",
func() (func(string, ...string) *exec.Cmd, *[][]string) {
cmdsCalled := [][]string{}
return func(cmd string, args ...string) *exec.Cmd {
cmdsCalled = append(cmdsCalled, args)
return exec.Command("echo")
}, &cmdsCalled
},
func(cmdsCalled *[][]string, err error) {
assert.NoError(t, err)
assert.Len(t, *cmdsCalled, 2)
assert.EqualValues(t, *cmdsCalled, [][]string{
{"reset", "--", "test"},
{"checkout", "--", "test"},
})
},
&File{
Name: "test",
Tracked: true,
HasInlineMergeConflicts: true,
},
func(string) error {
return nil
},
},
{
"Reset and remove",
func() (func(string, ...string) *exec.Cmd, *[][]string) {