| 172 | } |
| 173 | |
| 174 | func (branch Branch) removeWipQualifier(localBranches []string, configuration config.Configuration) Branch { |
| 175 | for !branch.exists(localBranches) && branch.hasWipBranchQualifierSeparator(configuration) { |
| 176 | afterRemoval := branch.removeWipQualifierSuffixOrSeparator(configuration) |
| 177 | |
| 178 | if branch == afterRemoval { // avoids infinite loop |
| 179 | break |
| 180 | } |
| 181 | |
| 182 | branch = afterRemoval |
| 183 | } |
| 184 | return branch |
| 185 | } |
| 186 | |
| 187 | func (branch Branch) removeWipQualifierSuffixOrSeparator(configuration config.Configuration) Branch { |
| 188 | if !configuration.CustomWipBranchQualifierConfigured() { // WipBranchQualifier not configured |