Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Does EGit use .git/info/exclude?
Does EGit use .git/info/exclude? [message #1076036] Tue, 30 July 2013 15:03 Go to next message
Chris Leon is currently offline Chris Leon
Messages: 2
Registered: July 2013
Junior Member
I've just started using EGit to work with a local repository on a project that has a large (VERY large) number of files, some symlinked from a NFS, that get created in the local repository, but should be totally ignored for the purposes of git operations: checkout, commit, branch, etc.

I've added the directories to the .git/info/exclude file, and git operations from the command line work as expected: I can throw a new local branch, checkout to switch between my local branches, etc.

Everytime I use EGit to do similar commands though, the operation hangs. Taking a stack trace shows things like:

"Worker-6" prio=10 tid=0x9d400800 nid=0x6c80 runnable [0x9d3fe000]
   java.lang.Thread.State: RUNNABLE
	at java.io.UnixFileSystem.list(Native Method)
	at java.io.File.list(File.java:1048)
	at java.io.File.listFiles(File.java:1133)
	at org.eclipse.jgit.treewalk.FileTreeIterator.entries(FileTreeIterator.java:138)
	at org.eclipse.jgit.treewalk.FileTreeIterator.<init>(FileTreeIterator.java:128)
	at org.eclipse.jgit.treewalk.FileTreeIterator.createSubtreeIterator(FileTreeIterator.java:134)
	at org.eclipse.jgit.treewalk.AbstractTreeIterator.createSubtreeIterator(AbstractTreeIterator.java:535)
	at org.eclipse.jgit.treewalk.TreeWalk.enterSubtree(TreeWalk.java:908)
	at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:566)
	at org.eclipse.egit.core.op.BranchOperation.getMissingProjects(BranchOperation.java:241)
	at org.eclipse.egit.core.op.BranchOperation.access$1(BranchOperation.java:204)
	at org.eclipse.egit.core.op.BranchOperation$1.run(BranchOperation.java:108)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
	at org.eclipse.egit.core.op.BranchOperation.execute(BranchOperation.java:162)
	at org.eclipse.egit.ui.internal.branch.BranchOperationUI$1.run(BranchOperationUI.java:199)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


I suspect that egit/jgit is walking a directory structure that I really want it to just ignore, and which I've put in to the exclude file for that reason. Is that the case? How should I be telling egit not to look at those directories?
Re: Does EGit use .git/info/exclude? [message #1076510 is a reply to message #1076036] Wed, 31 July 2013 13:57 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 331
Registered: July 2009
Senior Member
Chris Leon skrev 2013-07-30 19.28:
> I've just started using EGit to work with a local repository on a project that has a large (VERY large) number of files, some symlinked from a NFS, that get created in the
> local repository, but should be totally ignored for the purposes of git operations: checkout, commit, branch, etc.
>
> I've added the directories to the .git/info/exclude file, and git operations from the command line work as expected: I can throw a new local branch, checkout to switch
> between my local branches, etc.
>
> Everytime I use EGit to do similar commands though, the operation hangs. Taking a stack trace shows things like:
>
> "Worker-6" prio=10 tid=0x9d400800 nid=0x6c80 runnable [0x9d3fe000]
> java.lang.Thread.State: RUNNABLE
> at java.io.UnixFileSystem.list(Native Method)
> at java.io.File.list(File.java:1048)
> at java.io.File.listFiles(File.java:1133)
> at org.eclipse.jgit.treewalk.FileTreeIterator.entries(FileTreeIterator.java:138)
> at org.eclipse.jgit.treewalk.FileTreeIterator.<init>(FileTreeIterator.java:128)
> at org.eclipse.jgit.treewalk.FileTreeIterator.createSubtreeIterator(FileTreeIterator.java:134)
> at org.eclipse.jgit.treewalk.AbstractTreeIterator.createSubtreeIterator(AbstractTreeIterator.java:535)
> at org.eclipse.jgit.treewalk.TreeWalk.enterSubtree(TreeWalk.java:908)
> at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:566)
> at org.eclipse.egit.core.op.BranchOperation.getMissingProjects(BranchOperation.java:241)
> at org.eclipse.egit.core.op.BranchOperation.access$1(BranchOperation.java:204)
> at org.eclipse.egit.core.op.BranchOperation$1.run(BranchOperation.java:108)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
> at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
> at org.eclipse.egit.core.op.BranchOperation.execute(BranchOperation.java:162)
> at org.eclipse.egit.ui.internal.branch.BranchOperationUI$1.run(BranchOperationUI.java:199)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>
>
> I suspect that egit/jgit is walking a directory structure that I really want it to just ignore, and which I've put in to the exclude file for that reason. Is that the
> case? How should I be telling egit not to look at those directories?

It's correct that JGit walks ignored directories and then ignores them. It's a performance bug.

-- robin
Re: Does EGit use .git/info/exclude? [message #1076513 is a reply to message #1076510] Wed, 31 July 2013 14:01 Go to previous message
Chris Leon is currently offline Chris Leon
Messages: 2
Registered: July 2013
Junior Member
Is there a bug that I should vote for or log?
Previous Topic:private repository push problem
Next Topic:JGIT Pull NoHeadException
Goto Forum:
  


Current Time: Thu Oct 30 15:15:55 GMT 2014

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

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