diff options
author | Mykola Nikishov | 2009-10-18 04:14:24 +0000 |
---|---|---|
committer | Shawn O. Pearce | 2009-11-01 03:13:56 +0000 |
commit | 84b7cb118370462f213b0a58dc92f48cb276b7ca (patch) | |
tree | 2d13398c962876a0976bc000a55f269d5fc7976f /org.eclipse.egit.core | |
parent | 84ea4dd6f71f24ca1aba2999072db3a761e64d89 (diff) | |
download | egit-84b7cb118370462f213b0a58dc92f48cb276b7ca.tar.gz egit-84b7cb118370462f213b0a58dc92f48cb276b7ca.tar.xz egit-84b7cb118370462f213b0a58dc92f48cb276b7ca.zip |
Make a comment which describes a precondition public
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>
Diffstat (limited to 'org.eclipse.egit.core')
-rw-r--r-- | org.eclipse.egit.core/src/org/eclipse/egit/core/project/RepositoryMapping.java | 10 |
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 2b7e874bce..a9808a2ef1 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(); |