diff --git a/merge.go b/merge.go index 8dcc716..ed900db 100644 --- a/merge.go +++ b/merge.go @@ -444,3 +444,27 @@ func (rs *RepoStatus) setMergeUserCommands() { rs.versionCmdOutput.SetValue(strings.Join(tmp, "\n")) } + +func (rs *RepoStatus) IsCorrectMode(mode string) bool { + switch mode { + case "master": + if rs.GetCurrentBranchName() == rs.GetMasterBranchName() { + return true + } else { + return false + } + case "devel": + if rs.GetCurrentBranchName() == rs.GetDevelBranchName() { + return true + } else { + return false + } + case "user": + if rs.GetCurrentBranchName() == rs.GetUserBranchName() { + return true + } else { + return false + } + } + return false +}