Skip to content

Commit

Permalink
Merge pull request #46 from ViBiOh/smerge
Browse files Browse the repository at this point in the history
Adding SublimeMerge support
  • Loading branch information
isidore authored Apr 17, 2024
2 parents 32d5677 + c00c044 commit 434b910
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 434b910

Please sign in to comment.