This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244301 - netbeans git client removes final '/' from sym link
Summary: netbeans git client removes final '/' from sym link
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Ondrej Vrabec
URL: https://bugs.eclipse.org/bugs/show_bu...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-05 10:09 UTC by xkr
Modified: 2014-06-04 08:37 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (67.47 KB, text/plain)
2014-05-05 10:09 UTC, xkr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xkr 2014-05-05 10:09:25 UTC
Product Version = NetBeans IDE Dev (Build 201405050001)
Operating System = Linux version 3.11.10-7-desktop running on amd64
Java; VM; Vendor = 1.7.0_51
Runtime = OpenJDK 64-Bit Server VM 24.45-b08

After clean "git clone" of project that contains sym links by netbeans, the git reports following changes for my project (and for other many sym links). This means that the sym link lost '/' at the end of sym link specification. The '/' shall be preserved in the sym link.

--- a/qosmos/link
+++ b/qosmos/link
@@ -1 +1 @@
-SDK-4.16.0-21-x86_64-LSB-SMP-QA-12-004/
\ No newline at end of file
+SDK-4.16.0-21-x86_64-LSB-SMP-QA-12-004
\ No newline at end of file
Comment 1 xkr 2014-05-05 10:09:28 UTC
Created attachment 147111 [details]
IDE log
Comment 2 Ondrej Vrabec 2014-05-05 10:36:59 UTC
Does ending '/' have any special meaning for a symlink? Does it have to be there?
Comment 3 xkr 2014-05-07 08:30:43 UTC
The '/' does not have any special meaning for symlink. However netbeans client modifies the sources when does the cloning. We have third party SW that has '/' at the end of symlinks. If it is cloned by netbeans it immediately changes this library and will require commit to it. This also applies if you checkout tags with such symlinks. You shall not modify sources when you do netbeans git clone. The standard command line git clone preserves the '/' at the end.
Comment 4 xkr 2014-05-07 08:33:34 UTC
Of course the '/' shall be at the end of symlink when user put it there originaly and commited as such - so preserved by netbenas. If '/' is missing in symlink, netbeans shall not add it by it's will.
Comment 5 Ondrej Vrabec 2014-05-07 10:49:49 UTC
NetBeans does not modify anything, JGit client does that: already filed as https://bugs.eclipse.org/bugs/show_bug.cgi?id=408630Or more specifically it's a java7 limitation, Files.createSymbolicLink(Path, Path)
Comment 6 Ondrej Vrabec 2014-05-07 11:05:17 UTC
lost during login:
... i am really sorry but i can not fix your problem in any way.
Comment 7 Ondrej Vrabec 2014-05-07 11:06:39 UTC
... Files.createSymbolicLink(Path, Path) does not allow creating a symlink with not normalized path, Path cannot be constructed as "target/", it will always be only "target".
Comment 8 xkr 2014-06-04 07:08:38 UTC
I am not disputing your response. 

However I have tried IntelliJ Idea IDE community version, that I believe is in java and there the git client works without any problem - it shows that it can be done with simlinks even with java.

Also I want to mention that the git repository browser presenting the version and branches in dependency graph is extremely nice in IntelliJ.
I propose to do some kind of dependency graph in Netbeans.
Comment 9 Ondrej Vrabec 2014-06-04 08:37:31 UTC
(In reply to xkr from comment #8)
> However I have tried IntelliJ Idea IDE community version, that I believe is
> in java and there the git client works without any problem - it shows that
> it can be done with simlinks even with java.
Then it probably means IntelliJ does not use JGit but may call to git executable directly. Not sure about that.
> Also I want to mention that the git repository browser presenting the
> version and branches in dependency graph is extremely nice in IntelliJ.
> I propose to do some kind of dependency graph in Netbeans.
No idea what that is, you could file another issue on git and provide several screenshots so i know what you are talking about.

Reassigning back to git, JDK team won't fix this for sure.