Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateMergeCommit = func(shell *Shell) { CreateMergeConflictFile(shell) shell.UpdateFileAndAdd("file", SecondChangeFileContent) shell.ContinueMerge() }
View Source
var CreateMergeConflictFile = func(shell *Shell) { MergeConflictsSetup(shell) shell.RunCommandExpectError([]string{"git", "merge", "--no-edit", "second-change-branch"}) }
View Source
var CreateMergeConflictFileMultiple = func(shell *Shell) { shell. NewBranch("original-branch"). EmptyCommit("one"). EmptyCommit("two"). EmptyCommit("three"). CreateFileAndAdd("file", OriginalFileContentMultiple). Commit("original"). NewBranch("first-change-branch"). UpdateFileAndAdd("file", FirstChangeFileContentMultiple). Commit("first change"). Checkout("original-branch"). NewBranch("second-change-branch"). UpdateFileAndAdd("file", SecondChangeFileContentMultiple). Commit("second change"). EmptyCommit("second-change-branch unrelated change"). Checkout("first-change-branch") shell.RunCommandExpectError([]string{"git", "merge", "--no-edit", "second-change-branch"}) }
View Source
var CreateMergeConflictFiles = func(shell *Shell) { shell. NewBranch("original-branch"). EmptyCommit("one"). EmptyCommit("two"). EmptyCommit("three"). CreateFileAndAdd("file1", OriginalFileContent). CreateFileAndAdd("file2", OriginalFileContent). Commit("original"). NewBranch("first-change-branch"). UpdateFileAndAdd("file1", FirstChangeFileContent). UpdateFileAndAdd("file2", FirstChangeFileContent). Commit("first change"). Checkout("original-branch"). NewBranch("second-change-branch"). UpdateFileAndAdd("file1", SecondChangeFileContent). UpdateFileAndAdd("file2", SecondChangeFileContent). CreateFileAndAdd("file3", "content"). Commit("second change"). EmptyCommit("second-change-branch unrelated change"). Checkout("first-change-branch") shell.RunCommandExpectError([]string{"git", "merge", "--no-edit", "second-change-branch"}) }
creates a merge conflict where there are two files with conflicts and a separate file without conflicts
View Source
var FirstChangeFileContent = `
This
Is
The
First Change
File
`
View Source
var FirstChangeFileContentMultiple = `
This
Is
The
First Change
File
..
It
Is
Longer
Than
The
Other
Other First Change
`
View Source
var MergeConflictsSetup = func(shell *Shell) { shell. NewBranch("original-branch"). EmptyCommit("one"). EmptyCommit("two"). EmptyCommit("three"). CreateFileAndAdd("file", OriginalFileContent). Commit("original"). NewBranch("first-change-branch"). UpdateFileAndAdd("file", FirstChangeFileContent). Commit("first change"). Checkout("original-branch"). NewBranch("second-change-branch"). UpdateFileAndAdd("file", SecondChangeFileContent). Commit("second change"). EmptyCommit("second-change-branch unrelated change"). Checkout("first-change-branch") }
prepares us for a rebase/merge that has conflicts
View Source
var OriginalFileContent = `
This
Is
The
Original
File
`
View Source
var OriginalFileContentMultiple = `
This
Is
The
Original
File
..
It
Is
Longer
Than
The
Other
Options
`
View Source
var SecondChangeFileContent = `
This
Is
The
Second Change
File
`
View Source
var SecondChangeFileContentMultiple = `
This
Is
The
Second Change
File
..
It
Is
Longer
Than
The
Other
Other Second Change
`
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.