Community
Participate
Working Groups
If I delete several local branches, the UI freezes. This should be done via a job.
That's strange. Branch deletion is done in an IWorkspaceRunnable, holding the workspace lock. Since the currently checked-out branch cannot be deleted anyway, I fail to see how this operation could modify the workspace at all. Does anyone know why org.eclipse.egit.ui.internal.repository.tree.command.DeleteBranchCommand and org.eclipse.egit.core.op.DeleteBranchOperation use IWorkspaceRunnables? Git blame doesn't give any useful clues.
The first commit 0213f9296e68c228dedcc75b247708de7c766ebf seems to have introducted that lock. I think it can be removed.
(In reply to Lars Vogel from comment #2) > The first commit 0213f9296e68c228dedcc75b247708de7c766ebf seems to have > introducted that lock. I think it can be removed. That's why I wrote git blame gave no useful clues :-) Maybe I should have been clearer... I'm a bit worried that it was done as a means to avoid that the user does other destructive git operations on the repo while the branch deletion was underway. For instance, deleting the whole repo. Or managing to checkout one of the branches to be deleted, or similar crazy things. That surely would lead to unexpected exceptions. If that is a concern, doing asynchronous git operations would need to be re-vamped. (Actually, this may also be an issue for background push/pull/fetch... ?)
(In reply to Thomas Wolf from comment #3) > That's why I wrote git blame gave no useful clues :-) Maybe I should have > been clearer... AFAIK git blame only gives you the changes of the last commit, hence the additional info.
*** Bug 547288 has been marked as a duplicate of this bug. ***
Even if those git operations do not really conflict with workspace changes, they may conflict with each other. Maybe the workspace runnables are just an attempt of queuing those operations to avoid such conflicts? E.g. I have managed several times to delete a big amount of branches and at the same time try to check out one of those branches, see bug 457226.