Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Behavior of JGit regarding links?(Can I detect links in paths? And document behavior about walking using links.)
Behavior of JGit regarding links? [message #1828094] Mon, 01 June 2020 08:51
Eclipse UserFriend
JGit supports symbolic links, in the sense that I can ask it whether a file is a symbolic link. That's great! And it raises a few questions for which I couldn't find answers in the documentation.

I wonder if TreeWalk#forPath is supposed (by contract) to follow links, and if this behavior can be explicitly enabled or disabled? (I found WorkingTreeOptions#getSymLinks, but the relationship with the above method and what this option does exactly is unclear to me.)

Relatedly, I wonder if I can detect whether a path uses a symbolic link? And can I obtain easily the target path?

For example, given the path mylink/somefile, where mylink is a link to myfolder/mysubfolder, I know how to obtain from JGit the information that mylink is a link; but is there an easy way to obtain the information that there is a link somewhere in the path "mylink/somefile" (without having to parse and check myself each folder name included in the path), and to directly obtain the information that this links to "myfolder/mysubfolder/somefile" (without having to reconstruct this from the link pieces included in the path)?
Previous Topic:JGit
Next Topic:EGit not recognising git repositories downloaded using repo tool
Goto Forum:
  


Current Time: Tue Jul 08 02:01:33 EDT 2025

Powered by FUDForum. Page generated in 0.51395 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top