Skip to content

Commit

Permalink
F - Adding SublimeMerge support
Browse files Browse the repository at this point in the history
  • Loading branch information
ViBiOh committed Dec 13, 2023
1 parent 32d5677 commit c00c044
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions reporters/diff_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func NewDiffReporter() Reporter {
NewFileMergeReporter(),
NewVSCodeReporter(),
NewGoLandReporter(),
NewSublimeMergeReporter(),
NewRealDiffReporter(),
NewPrintSupportedDiffProgramsReporter(),
NewQuietReporter(),
Expand Down
12 changes: 12 additions & 0 deletions reporters/sublime_merge.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package reporters

type sublimeMerge struct{}

// NewSublimeMergeReporter creates a new reporter for the SublimeMerge diff tool.
func NewSublimeMergeReporter() Reporter {
return &sublimeMerge{}
}

func (s *sublimeMerge) Report(approved, received string) bool {
return launchProgram("smerge", approved, "mergetool", received, approved, "-o", approved)
}

0 comments on commit c00c044

Please sign in to comment.