Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Internal error makes it impossible to use git

I am banging my head since yesterday on a problem that popped up after i switched branch on my Android git-managed project, an error pop-up keeps showing making it impossible to use git

pop up error

Eclipse's log shows :

!ENTRY org.eclipse.core.jobs 4 2 2014-11-27 12:05:44.993
!MESSAGE An internal error occurred during: "Computing Git status for repository git".
!STACK 0
java.lang.NullPointerException
    at org.eclipse.jgit.treewalk.WorkingTreeIterator.computeHash(WorkingTreeIterator.java:1003)
    at org.eclipse.jgit.treewalk.WorkingTreeIterator.contentCheck(WorkingTreeIterator.java:949)
    at org.eclipse.jgit.treewalk.WorkingTreeIterator.isModified(WorkingTreeIterator.java:843)
    at org.eclipse.jgit.treewalk.filter.IndexDiffFilter.include(IndexDiffFilter.java:223)
    at org.eclipse.jgit.treewalk.filter.AndTreeFilter$List.include(AndTreeFilter.java:163)
    at org.eclipse.jgit.treewalk.TreeWalk.next(TreeWalk.java:560)
    at org.eclipse.jgit.lib.IndexDiff.diff(IndexDiff.java:389)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry.calcIndexDiffDataFull(IndexDiffCacheEntry.java:486)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry.access$7(IndexDiffCacheEntry.java:475)
    at org.eclipse.egit.core.internal.indexdiff.IndexDiffCacheEntry$4.run(IndexDiffCacheEntry.java:286)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I tried various attempts to fix it :

  • Uninstalling EGIT from Eclipse via MarketPlace the process seems good but after restart, EGIT's still there.
  • Deleting it manually by removing it from plugins and featuresfolders as suggested on other posts.
  • Starting a fresh Eclipse install and importing git projects, the problem shows off right after the project are added.
  • Cloning my GIT repo into another location in a new workspace same problem.
  • I couldn't find the exact version of org.eclipse.jgit.treewalk.WorkingTreeIterator to check on what the NPE happens

It seems to like if my GIT repo was corrupted, any help would be much appreciated.

EDIT I don't know if it's relevant but here's Session data :

eclipse.buildId=4.4.1.M20140925-0400
java.version=1.6.0_43
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -data D:\Development\workspace -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
like image 565
Guerneen4 Avatar asked Nov 27 '14 12:11

Guerneen4


People also ask

Can Eclipse work with Git?

The Eclipse IDE provides support for the Git version control system. You can easily perform the necessary Git commands like staging, commit, merge, pull and push via the Eclipse IDE. Git is pre-installed in Eclipse IDE. If git is not installed by default, go to Help > Eclipse Marketplace and install git explicitly.

How do I manage Git in Eclipse?

Step 1: Open Preferences in Eclipse IDE. Then go to Team, then Git & then configuration. There you need to add your user name. You have to use a key as user.name & values as your name.


1 Answers

This solution worked for me right click on project go to Team - select Disconnect. Now refresh Project. commit all ur changes to branch. restart eclipse Problem solved.

if you want to share the project again. you can share it by following same steps Team - Share Porject.

like image 111
Shrikant More Avatar answered Sep 30 '22 04:09

Shrikant More