You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2023/01/03 12:59:23 UTC

[GitHub] [netbeans] tbw777 opened a new issue, #5185: git clone: Filename too long

tbw777 opened a new issue, #5185:
URL: https://github.com/apache/netbeans/issues/5185

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   ```
   C:\Users\Андрей\IdeaProjects>git clone https://github.com/tbw777/netbeans.git
   Cloning into 'netbeans'...
   remote: Enumerating objects: 416997, done.
   remote: Counting objects: 100% (24/24), done.
   remote: Compressing objects: 100% (16/16), done.
   remote: Total 416997 (delta 2), reused 11 (delta 0), pack-reused 416973
   Receiving objects: 100% (416997/416997), 212.05 MiB | 837.00 KiB/s, done.
   Resolving deltas: 100% (234077/234077), done.
   fatal: cannot create directory at 'platform/autoupdate.services/test/unit/data/nbm-source/org-yourorghere-depending_on_new_one_engine/netbeans/modules/org-yourorghere-depending_on_new_one_engine.jardir/org/yourorghere/depending_on_new_one_engine': Filename too long
   warning: Clone succeeded, but checkout failed.
   You can inspect what was checked out with 'git status'
   and retry with 'git restore --source=HEAD :/'
   ```
   
   ### How to reproduce
   
   run git clone command on path with similar length
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   windows 10
   
   ### JDK
   
   17
   
   ### Apache NetBeans packaging
   
   Other
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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-unsubscribe@netbeans.apache.org.apache.org

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


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

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


[GitHub] [netbeans] mbien commented on issue #5185: git clone: Filename too long

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #5185:
URL: https://github.com/apache/netbeans/issues/5185#issuecomment-1370396052

   looks like a test package which can be probably made shorter. Wouldn't say no if there is a simple fix for this without influencing the test.
   Adding https://github.com/apache/netbeans/labels/Contribution%20welcome label.
   
   there are also ways how to tell windows to allow longer path names/paths I believe (e.g [quick search](https://www.tenforums.com/tutorials/51704-enable-disable-win32-long-paths-windows-10-a.html)). Alternatively switching to a proper operating system is sometimes also an option :)


-- 
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-unsubscribe@netbeans.apache.org

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


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

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


[GitHub] [netbeans] JustLeonS commented on issue #5185: git clone: Filename too long

Posted by GitBox <gi...@apache.org>.
JustLeonS commented on issue #5185:
URL: https://github.com/apache/netbeans/issues/5185#issuecomment-1381799576

   I believe this is a git issue, not NetBeans fault. Which kind of fix expected on NetBeans end? Path length cap check before hand with a warning dialogue? 


-- 
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-unsubscribe@netbeans.apache.org

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


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

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


[GitHub] [netbeans] JustLeonS commented on issue #5185: git clone: Filename too long

Posted by GitBox <gi...@apache.org>.
JustLeonS commented on issue #5185:
URL: https://github.com/apache/netbeans/issues/5185#issuecomment-1387222851

   Would it be weird to suggest long paths unconditionally? I’d assume it is. In that case, I would go like this:
   
   1) clone repo without checking out any branch; 
   2) checks for windows os, os long paths disabled and “git config --system core.longpaths” is false;
   3) “git ls-files”;
   4) local repo path length + iteration over returned strings;
   5) if there any length over the limit, throw exception with the message.
   
   The problem: eclipse implements git interactions over eclipse’s jgit lib, “git-ls-files” is not implemented there. If I would take this issue, am I supposed to go there and implement that command than wait ‘till dependency update here or it would be okay to drop here implementation like this? 
   
   ```
   ...
   BufferedReader reader = Runtime.getRuntime().exec("git ls-files").inputReader();
   long rootLen = cloneProjectRoot.toString().length();
   boolean pathLimit = reader.lines().anyMatch(p -> WIN_PATH_LIMIT >= (p.length() + rootLen));
    if (pathLimit) ...
   ```
   
   At this point we are pretty much protected from IOExceptions by successful “git clone”, I don’t see it failing any other way.
   
   Maybe I am missing some other option?
   


-- 
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-unsubscribe@netbeans.apache.org

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


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

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


[GitHub] [netbeans] tbw777 closed issue #5185: git clone: Filename too long

Posted by "tbw777 (via GitHub)" <gi...@apache.org>.
tbw777 closed issue #5185: git clone: Filename too long
URL: https://github.com/apache/netbeans/issues/5185


-- 
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-unsubscribe@netbeans.apache.org

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


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

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


[GitHub] [netbeans] tbw777 commented on issue #5185: git clone: Filename too long

Posted by "tbw777 (via GitHub)" <gi...@apache.org>.
tbw777 commented on issue #5185:
URL: https://github.com/apache/netbeans/issues/5185#issuecomment-1413346862

   To fix this problem on win10:
   1. Check \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled = 1
   2. Set:
   [core]
           longpaths = true


-- 
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-unsubscribe@netbeans.apache.org

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


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

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