git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [EGIT PATCH] Won't append '/' to an empty repo relative path.
@ 2007-09-28  4:39 Jing Xue
  2007-09-28 19:15 ` Robin Rosenberg
  0 siblings, 1 reply; 2+ messages in thread
From: Jing Xue @ 2007-09-28  4:39 UTC (permalink / raw)
  To: git


When the repo relative path is empty, the extra "/" causes all subsequent
"startsWith" tests to fail.

Signed-off-by: Jing Xue <jingxue@digizenstudio.com>
---
 .../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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [EGIT PATCH] Won't append '/' to an empty repo relative path.
  2007-09-28  4:39 [EGIT PATCH] Won't append '/' to an empty repo relative path Jing Xue
@ 2007-09-28 19:15 ` Robin Rosenberg
  0 siblings, 0 replies; 2+ messages in thread
From: Robin Rosenberg @ 2007-09-28 19:15 UTC (permalink / raw)
  To: Jing Xue; +Cc: git

fredag 28 september 2007 skrev Jing Xue:
> 
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-28 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-28  4:39 [EGIT PATCH] Won't append '/' to an empty repo relative path Jing Xue
2007-09-28 19:15 ` Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).