aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMykola Nikishov2009-10-18 00:14:24 (EDT)
committerShawn O. Pearce2009-10-31 23:13:56 (EDT)
commit84b7cb118370462f213b0a58dc92f48cb276b7ca (patch)
tree2d13398c962876a0976bc000a55f269d5fc7976f
parent84ea4dd6f71f24ca1aba2999072db3a761e64d89 (diff)
downloadegit-84b7cb118370462f213b0a58dc92f48cb276b7ca.zip
egit-84b7cb118370462f213b0a58dc92f48cb276b7ca.tar.gz
egit-84b7cb118370462f213b0a58dc92f48cb276b7ca.tar.bz2
Make a comment which describes a precondition publicrefs/changes/83/83/2
As user responsibile to assert that parameter which is passed to this method is valid it is reasonable to make this info available in a documentation. Change-Id: I6f6cd55a482cff769a5059c8e8362ce2102b5f3c Signed-off-by: Mykola Nikishov <mn@mn.com.ua> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java
index 2b7e874..a9808a2 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java
@@ -198,15 +198,15 @@ public class RepositoryMapping {
}
/**
+ * This method should only be called for resources that are actually in this
+ * repository, so we can safely assume that their path prefix matches
+ * {@link #getWorkDir()}. Testing that here is rather expensive so we don't
+ * bother.
+ *
* @param rsrc
* @return the path relative to the Git repository, including base name.
*/
public String getRepoRelativePath(final IResource rsrc) {
- // We should only be called for resources that are actually
- // in this repository, so we can safely assume that their
- // path prefix matches workdirPrefix. Testing that here is
- // rather expensive so we don't bother.
- //
final int pfxLen = workdirPrefix.length();
final String p = rsrc.getLocation().toString();
final int pLen = p.length();