mbien commented on code in PR #8499:
URL: https://github.com/apache/netbeans/pull/8499#discussion_r2103220713


##########
ide/libs.git/src/org/netbeans/libs/git/jgit/commands/MoveTreeCommand.java:
##########
@@ -77,23 +77,29 @@ protected void run() throws GitException {
         }
         sourceFile = tryNormalizeSymlink(sourceFile);
         targetFile = tryNormalizeSymlink(targetFile);
-        Repository repository = getRepository();
+               
+               Repository repository = getRepository();
+               
+               File repoWorkTreeNormalized = 
tryNormalizeSymlink(repository.getWorkTree());
+               
         try {
             DirCache cache = repository.lockDirCache();
             try {
-                List<String> ignoredTargets = getIgnores(targetFile);
+                
+                               List<String> ignoredTargets = 
getIgnores(this.source);

Review Comment:
   this codebase uses spaces instead of tabs, you can see the broken formatting 
when you open the diff view on github with default settings: 
https://github.com/apache/netbeans/pull/8499/files
   
   Would be good if you could fix this, feel free to edit the commit and force 
push into your branch so that the diff only contains the necessary changes for 
this improvement.



##########
ide/libs.git/src/org/netbeans/libs/git/jgit/commands/MoveTreeCommand.java:
##########
@@ -185,7 +191,9 @@ private void rename () throws GitException {
 
     private String getRelativePath (File file, File ancestor, File target) {
         String relativePathToAncestor = Utils.getRelativePath(ancestor, file);
-        StringBuilder relativePathToSource = new 
StringBuilder(Utils.getRelativePath(getRepository().getWorkTree(), target));
+        StringBuilder relativePathToSource = new 
StringBuilder(Utils.getRelativePath(
+                               
tryNormalizeSymlink(getRepository().getWorkTree()), 
+                               target));

Review Comment:
   ```java
           StringBuilder relativePathToSource = new StringBuilder(
                   
Utils.getRelativePath(tryNormalizeSymlink(getRepository().getWorkTree()), 
target)
           );
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to