Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-03-30 16:42:20 +0000
committerThomas Wolf2018-04-11 19:04:23 +0000
commita71fc4189ea70233e95a7e4b46ed00ff7b198b59 (patch)
treed34989c02f681180c7c5c39c823d9e7894d7af5c /org.eclipse.egit.mylyn.ui
parentaa778899b1b12d4cd8d980056012aa7a30b70273 (diff)
downloadegit-a71fc4189ea70233e95a7e4b46ed00ff7b198b59.tar.gz
egit-a71fc4189ea70233e95a7e4b46ed00ff7b198b59.tar.xz
egit-a71fc4189ea70233e95a7e4b46ed00ff7b198b59.zip
Remove problem characters from task related branch name suggestion
In addition to standard branch name normalization, remove also specific mylyn related problem characters when creating the branch name from a mylyn task context. Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Change-Id: I7a6a254c75f37fac12930e33771820d9b47b29e7 Bug: 531171
Diffstat (limited to 'org.eclipse.egit.mylyn.ui')
-rw-r--r--org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/ActiveTaskBranchNameProvider.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/ActiveTaskBranchNameProvider.java b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/ActiveTaskBranchNameProvider.java
index 8c06b6d730..a15ddb031e 100644
--- a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/ActiveTaskBranchNameProvider.java
+++ b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/ActiveTaskBranchNameProvider.java
@@ -53,8 +53,9 @@ public class ActiveTaskBranchNameProvider implements IBranchNameProvider {
}
private String normalizeBranchName(String name) {
- String normalized = Repository.normalizeBranchName(name);
- if (normalized != null && normalized.length() > 30) {
+ String normalized = Repository
+ .normalizeBranchName(name.replaceAll("[#$!]", " ")); //$NON-NLS-1$ //$NON-NLS-2$
+ if (normalized.length() > 30) {
normalized = Repository
.normalizeBranchName(normalized.substring(0, 30));
}

Back to the top