When the repo relative path is empty, the extra "/" causes all subsequent "startsWith" tests to fail. Signed-off-by: Jing Xue <jingxue@xxxxxxxxxxxxxxxxx> --- .../egit/ui/internal/actions/CommitAction.java | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java index 82cad58..7d638c7 100644 --- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java +++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/actions/CommitAction.java @@ -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)) -- 1.5.3.2.116.ge36bb5 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html