add the concept of "mode" for the git repos
This commit is contained in:
parent
9a1347c03f
commit
fc849f6003
24
merge.go
24
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue