Author: struberg
Date: Sun Jan 30 19:58:55 2011
New Revision: 1065365

URL: http://svn.apache.org/viewvc?rev=1065365&view=rev
Log:
[SCM-508] fix IndexOutOfBounds in  relativePath logic

Modified:
    
maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/GitCommandLineUtils.java

Modified: 
maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/GitCommandLineUtils.java
URL: 
http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/GitCommandLineUtils.java?rev=1065365&r1=1065364&r2=1065365&view=diff
==============================================================================
--- 
maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/GitCommandLineUtils.java
 (original)
+++ 
maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/GitCommandLineUtils.java
 Sun Jan 30 19:58:55 2011
@@ -54,7 +54,7 @@ public class GitCommandLineUtils
             if ( f.getAbsolutePath().startsWith( 
cl.getWorkingDirectory().getAbsolutePath() ) )
             {
                 // so we can omit the starting characters
-                relativeFile = relativeFile.substring( 
cl.getWorkingDirectory().getAbsolutePath().length() );
+                relativeFile = f.getAbsolutePath().substring( 
cl.getWorkingDirectory().getAbsolutePath().length() );
 
                 if ( relativeFile.startsWith( File.separator ) )
                 {


Reply via email to