Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » SymlinksNotSupportedException when resetting to HEAD
SymlinksNotSupportedException when resetting to HEAD [message #1412932] Wed, 27 August 2014 11:44 Go to next message
Guenther Grau is currently offline Guenther GrauFriend
Messages: 2
Registered: August 2014
Junior Member
Hi,

I just downloaded and installed luna on Win 7/Java 8u20. I have imported projects from an existing local git repository. When I try to reset the repository to head, I get an error message. The appended exception is logged in .log

Any idea what could be going wrong here?

Thanx and best regards,

Guenther


!ENTRY org.eclipse.core.jobs 4 2 2014-08-27 13:09:47.396
!MESSAGE An internal error occurred during: "Resetting to HEAD".
!STACK 0
org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of reset command. {0}
at org.eclipse.jgit.api.ResetCommand.call(ResetCommand.java:227)
at org.eclipse.egit.core.op.ResetOperation.reset(ResetOperation.java:97)
at org.eclipse.egit.core.op.ResetOperation.access$0(ResetOperation.java:85)
at org.eclipse.egit.core.op.ResetOperation$1.run(ResetOperation.java:74)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.egit.core.op.ResetOperation.execute(ResetOperation.java:78)
at org.eclipse.egit.core.internal.job.JobUtil$2.runInWorkspace(JobUtil.java:105)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.SymlinksNotSupportedException: Symlinks are not supported with this OS/JRE
at org.eclipse.jgit.util.FS.createSymLink(FS.java:612)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1203)
at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:459)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:394)
at org.eclipse.jgit.api.ResetCommand.checkoutIndex(ResetCommand.java:393)
at org.eclipse.jgit.api.ResetCommand.call(ResetCommand.java:200)
... 8 more
Re: SymlinksNotSupportedException when resetting to HEAD [message #1412994 is a reply to message #1412932] Wed, 27 August 2014 14:15 Go to previous messageGo to next message
Christian Halstrick is currently offline Christian HalstrickFriend
Messages: 274
Registered: July 2009
Senior Member
It seems you are trying to work on a repository which contains symbolic links on a Windows machine. In such a case JGit should honor core.symlinks and should create text-files (containing the path to the link target) instead of symlinks. This would allow you to at least checkout a project.

In general EGit/JGit seem to work correctly. I can clone https://github.com/chalstrick/differentFileModes.git and switch to branch symLinks on windows. Something most be different on your machine.

Can you tell exactly which repo you cloned and which steps you did to reach the bug?


Ciao
Chris
Re: SymlinksNotSupportedException when resetting to HEAD [message #1413005 is a reply to message #1412994] Wed, 27 August 2014 14:46 Go to previous messageGo to next message
Guenther Grau is currently offline Guenther GrauFriend
Messages: 2
Registered: August 2014
Junior Member
Hi Chris,

I cloned https ://github.com/graug/zxing.git sometime March or April 2013 to develop a feature for ZXing. I haven't been working on the project since May 2013. Now that I have some time on my hands, I downloaded Luna and Java 8 and imported the projects from my existing local git repo using the eclipse repository view.
I then open the context menu of the master branch and select rebase. I select the zxing upstream master project https ://github.com/zxing/zxing.git. Eclipse then tells me that I have local changes and asks me what to do with them. It offers me to reset or stash (or commit the changes). Neither of reset or stash works. When I select reset to discard my local changes I get above mentioned error. Stashing my changes also doesn't work. It stashes the changes but opens the same dialog informing me about changes again.
As a workaround I'm creating a new local clone of https ://github.com/graug/zxing.git but this takes forever to complete Sad

Thanx for looking into this and best regards,

Guenther

P.S.: Had to cripple the links because the forum wouldn't let me post URLs except to eclipse.org as I have posted less than 5 messages.
Re: SymlinksNotSupportedException when resetting to HEAD [message #1420062 is a reply to message #1413005] Tue, 09 September 2014 13:05 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1272
Registered: July 2009
Senior Member
* Did you install the jgit java7 bundle ?
* on Windows with default security settings you need elevated privileges to use symbolic links, see [1]
* Does "git reset --hard" using native git fix the problem ?
* If you want another clone and it's slow over the network (I could clone it in 7 minutes) you may clone from your already existing clone and then change the remote to point to github

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=354367#c41
Previous Topic:Custom merge commit message
Next Topic:Trouble with installing EGit Eclipse Plugin
Goto Forum:
  


Current Time: Wed Sep 25 11:32:30 GMT 2024

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

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

Back to the top