Won't append '/' to an empty repo relative path.
PATCH 1/1 Won't append '/' to an empty repo relative path.
When the repo relative path is empty, the extra "/" causes all subsequent "startsWith" tests to fail.
Signed-off-by Jing Xue <[email protected]>
--- .../egit/ui/internal/actions/CommitAction.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java +5 -1
@@ -358,7 +358,11 @@ public class CommitAction implements IObjectActionDelegate { } private void includeList(IProject project, HashSet<String> added, ArrayList<IFile> category) { - String repoRelativePath = RepositoryMapping.getMapping(project).getRepoRelativePath(project) + "/"; + String repoRelativePath = RepositoryMapping.getMapping(project).getRepoRelativePath(project); + if (repoRelativePath.length() > 0) { + repoRelativePath += "/"; + } + for (String filename : added) { try { if (!filename.startsWith(repoRelativePath))
Signature · 1 line
1.5.3.2.116.ge36bb5
fredag 28 september 2007 skrev Jing Xue:
Quoted 4 lines
When the repo relative path is empty, the extra "/" causes all subsequent "startsWith" tests to fail.
Thank you.
Please cc me in the future.
--- robin