This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 226382 - NullPointerException at org.eclipse.jgit.dircache.DirCacheCheckout.processEntry
Summary: NullPointerException at org.eclipse.jgit.dircache.DirCacheCheckout.processEntry
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on: 221737
Blocks:
  Show dependency tree
 
Reported: 2013-02-20 09:47 UTC by medeag
Modified: 2013-03-11 10:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 193746


Attachments
stacktrace (2.42 KB, text/plain)
2013-02-20 09:47 UTC, medeag
Details

Note You need to log in before you can comment on or make changes to this bug.
Description medeag 2013-02-20 09:47:34 UTC
Build: NetBeans IDE 7.3 (Build 201302062200)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.13-b02, Java(TM) SE Runtime Environment, 1.6.0_38-b05
OS: Windows 7

User Comments:
cunneen: Trying to pull a git respository from bitbucket.org

sheershoff: pulling from remote ssh

medeag: checking out revision git




Stacktrace: 
java.lang.NullPointerException
   at org.eclipse.jgit.dircache.DirCacheCheckout.processEntry(DirCacheCheckout.java:682)
   at org.eclipse.jgit.dircache.DirCacheCheckout.preScanTwoTrees(DirCacheCheckout.java:246)
   at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:395)
   at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:381)
   at org.netbeans.libs.git.jgit.commands.CheckoutRevisionCommand.run(CheckoutRevisionCommand.java:111)
   at org.netbeans.libs.git.jgit.commands.GitCommand.execute(GitCommand.java:73)
Comment 1 medeag 2013-02-20 09:47:36 UTC
Created attachment 131595 [details]
stacktrace
Comment 2 Ondrej Vrabec 2013-02-20 10:14:20 UTC
Is it reproducible?
There must be something unusual about your setups. Maybe the remote repository has no HEAD yet (no commit has been pushed to the repo) or your local repository is fresh new and has no revision checked out yet? Please provide as much information as possible.
Comment 3 cunneen 2013-02-20 10:20:24 UTC
(In reply to comment #2)
> Is it reproducible?
> There must be something unusual about your setups. Maybe the remote repository
> has no HEAD yet (no commit has been pushed to the repo) or your local
> repository is fresh new and has no revision checked out yet? Please provide as
> much information as possible.

This was months ago. There was nothing unusual about my setup. Normal install.

I abandoned Netbeans 7.3 due to this issue. I'm back on 7.2.1 .
Comment 4 sheershoff 2013-02-20 10:36:38 UTC
As far as I remember - merging with "Git extensions" helped and everything was ok after it.

I know that sometimes netbeans is unable to do pulls, so I have Git extensions for that case. If the problem emerges again I'll give details if it will not disclose sensitive information.
Comment 5 medeag 2013-02-20 10:39:03 UTC
I'm really new to git(only one week with it) my setup is ok but i'm not sure if i have done something wrong. 
I was trying to checkout older revision since head contained unwanted changes, can't reproduce this now...
Comment 6 Ondrej Vrabec 2013-02-20 11:54:27 UTC
cunneen, sheershoff: your problem should be already fixed in the 7.3 final: it's a dupl. of bug #219648 i think.

medea: do you remember if you were on a branch at the time you did the checkout (was the branch name displayed next to a project name)? And how did you do the checkout? Using Git -> Checkout -> Revision, or Git -> Branch -> Switch to branch?
Comment 7 Ondrej Vrabec 2013-02-20 12:31:36 UTC
Was able to reproduce:
1) have a commit C1 that contains a file A
2) have a commit C2 where the file A is not present (was deleted in the commit)
3) checkout commit C1
4) delete the file just in the index (by running 'git rm --cached A')
5) now checkout C2
Comment 8 Ondrej Vrabec 2013-02-20 12:38:09 UTC
seems to be already fixed in JGit: http://git.eclipse.org/c/jgit/jgit.git/commit/org.eclipse.jgit/src/org/eclipse/jgit/dircache?id=0fb0e8440507e3e969432ea1115b806e5e04138c
We should consider upgrading.
Comment 9 Ondrej Vrabec 2013-03-11 10:29:39 UTC
JGit upgraded to 2.3.1, i consider this as fixed