[SCM-932] Absolute paths are converted to relative based on the repo root, not the basedir of the fileset.  Relative paths are checked to see if the repo root matches the basedir of the fileset and if not, are re-based on the repo root.

diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/JGitUtils.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/JGitUtils.java
index 6ad56ba..1cbcb2e 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/JGitUtils.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/src/main/java/org/apache/maven/scm/provider/git/jgit/command/JGitUtils.java
@@ -303,7 +303,7 @@
 
             if ( file.exists() )
             {
-                String path = relativize( baseUri, file );
+                String path = relativize( baseUri, file, git );
                 add.addFilepattern( path );
                 add.addFilepattern( file.getAbsolutePath() );
             }
@@ -329,7 +329,7 @@
             // really tracked
             for ( Iterator<File> itfl = fileSet.getFileList().iterator(); itfl.hasNext(); )
             {
-                String path = FilenameUtils.normalizeFilename( relativize( baseUri, itfl.next() ) );
+                String path = FilenameUtils.normalizeFilename( relativize( baseUri, itfl.next(), git ) );
                 if ( path.equals( FilenameUtils.normalizeFilename( scmfile.getPath() ) ) )
                 {
                     addedFiles.add( scmfile );
@@ -339,12 +339,24 @@
         return addedFiles;
     }
 
-    private static String relativize( URI baseUri, File f )
+    private static String relativize( URI baseUri, File f, Git git )
     {
         String path = f.getPath();
+        URI repoUri = git.getRepository().getWorkTree().toURI();
         if ( f.isAbsolute() )
         {
-            path = baseUri.relativize( new File( path ).toURI() ).getPath();
+            path = repoUri.relativize( new File( path ).toURI() ).getPath();
+        }
+        else // relative
+        {
+            // check if fileset base is same as repo root
+            if ( baseUri.compareTo( repoUri ) != 0 )
+            {
+                // if not, adjust the relative path to be relative to the root of the repo
+                // not the fileset base
+                String baseFolder = baseUri.getPath();
+                path = repoUri.relativize( new File( baseFolder, f.getPath() ).toURI() ).getPath();
+            }
         }
         return path;
     }