denio7 / egit

Automatically exported from code.google.com/p/egit
0 stars 0 forks source link

Egit marks symlinks as dirty / wont allow changing branches #70

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

i used git-svn to create a git repo to test egit.  there are two branches.
 i created a new project in eclipse, pointed it at my newly checked out
working copy, shared it with egit, and right away all the symlinks are
marked as dirty (>).  any commit operation brings up a new window showing
all the symlinks in the project marked as "Added, index diff".  

trying to change branches produces this error output:

OMC->ReadPreferences: invalid command description format version number
java.lang.reflect.InvocationTargetException
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:403)
    at
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:758)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:755)
    at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2483)
    at org.spearce.egit.ui.internal.actions.BranchAction.run(BranchAction.java:53)
    at
org.eclipse.team.internal.ui.actions.TeamAction.runWithEvent(TeamAction.java:548
)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:241)
    at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionCont
ributionItem.java:583)
    at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.
java:500)
    at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContribution
Item.java:411)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1561)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1585)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1570)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1360)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3474)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3064)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
    at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java
:113)
    at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ecli
pseAppLauncher.java:110)
    at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLau
ncher.java:79)
    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
    at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Caused by: java.lang.NullPointerException
    at org.spearce.jgit.lib.GitIndex.addEntry(GitIndex.java:743)
    at
org.spearce.jgit.lib.WorkDirCheckout.checkoutTwoTrees(WorkDirCheckout.java:146)
    at org.spearce.jgit.lib.WorkDirCheckout.checkout(WorkDirCheckout.java:137)
    at
org.spearce.egit.core.op.BranchOperation.checkoutTree(BranchOperation.java:134)
    at org.spearce.egit.core.op.BranchOperation.run(BranchOperation.java:70)
    at
org.spearce.egit.ui.internal.actions.BranchAction$1.run(BranchAction.java:58)
    at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.jav
a:121)

i cloned the egit repo at 9d148e252308bf3fc7727c0e4b91adddede64c22 (03-09-2009)

i followed the installation instructions at:
http://cho.hapgoods.com/wordpress/?p=159

git version 1.6.1.3
Eclipse SDK Version: 3.4.0

Original issue reported on code.google.com by chad...@gmail.com on 23 Mar 2009 at 10:13

GoogleCodeExporter commented 8 years ago
EGit/JGit does not work with symlinks. It just seesn the content they point at. 
The
reason is that Java does not support symlinks so support would require some for 
some
native code, which we try to abstain from. Symlinks are not available on all
platforms, which makes it impossible to support on all platforms.

A number of workarounds are possible. 

1) As msysgit does with and create a simple file with the link.
2) Cygwin approach and simulate using short cuts
3) As clearcase does and create copies of the linked files
4) Set the assume-unchanged flag and ignore them
5) An eclipse specific solution with a virtual file system
6) An eclipse specific solution involving linked resources.

None is high priority. I have worked with 3 using another SCM (guess) and that 
"works"
sort of. A problem is that special operations will be needed to handle the 
"symlinks"
on platforms that don't do symlinks.

Original comment by robin.ro...@gmail.com on 3 May 2009 at 1:06

GoogleCodeExporter commented 8 years ago
> EGit/JGit does not work with symlinks. It just seesn the content they point 
at. The
> reason is that Java does not support symlinks so support would require some 
for some
> native code, which we try to abstain from.

But that means that you effectively restrict Eclipse/EGit to *Java* *only*.

We are using EGit with RadRails (Eclipse derivative) and are working on a 
Ruby/Rails project.

Since EGit breaks symlinks it also breaks our possiblity to work with EGit in 
the real world.

If you do not really care whether the world outside can work with EGit then 
setting the Prio of this bug to low is correct. If you do not want to ignore 
the world outside Java then this bug has quite destructive consequences.

Original comment by tomas.po...@zhdk.ch on 12 Jul 2010 at 11:25

GoogleCodeExporter commented 8 years ago
See also discussion at http://www.eclipse.org/forums/index.php?t=tree&th=156013&

Original comment by tomas.po...@zhdk.ch on 12 Jul 2010 at 11:36

GoogleCodeExporter commented 8 years ago
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=300088 and 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318598

They may not match the exact description, but the core issue is the same.

Original comment by robin.ro...@gmail.com on 12 Jul 2010 at 4:45