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.
This issue was reported manually by sopko. It already has 1 duplicates Build: NetBeans IDE Dev (Build 201103140400) VM: Java HotSpot(TM) Client VM, 19.1-b02, Java(TM) SE Runtime Environment, 1.6.0_24-b07 OS: Windows Vista Stacktrace: java.lang.NullPointerException at org.netbeans.libs.git.jgit.JGitMergeResult.getMergedCommits(JGitMergeResult.java:105) at org.netbeans.libs.git.jgit.JGitMergeResult.<init>(JGitMergeResult.java:72) at org.netbeans.libs.git.jgit.commands.MergeCommand.run(MergeCommand.java:92) at org.netbeans.libs.git.jgit.commands.GitCommand.execute(GitCommand.java:70) at org.netbeans.libs.git.jgit.JGitClient.merge(JGitClient.java:360) at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:0)
Created attachment 107097 [details] stacktrace
Created attachment 107102 [details] junit test simulating the scenario
So in short what was the scenario (i guess from the log file and ui gestures log): 1) Git -> Initialize... 2) Git -> Fetch and fetch some external repository into origin - this will create remote branches in the local repository (let's say remotes/origin/master) 3) Git -> Merge and select origin/master. The action will try to merge origin/master into HEAD. And what goes wrong? Well, the HEAD has not yet been created, so basically you're trying to merge a branch into nothing. This scenario is however supported by jgit, thus we should not be surprised when it comes to this. This is a very very unusual and weird scenario, i assume you tried to clone an external repository, right? Than: 1) Either instead of a Merge invoke Checkout Branch action 2) Or download the latest build, the Clone action is already implemented
fix: http://hg.netbeans.org/core-main/rev/31412426d730
(In reply to comment #3) > This is a very very unusual and weird scenario, i assume you tried to clone an > external repository, right? Than: > 1) Either instead of a Merge invoke Checkout Branch action > 2) Or download the latest build, the Clone action is already implemented yes, i tried to clone a repository. As this version didn't have a clone command so I experimented a bit. I had to reinstall git now to get latest build with clone available. Thanks for fast fix and explanation.
Integrated into 'main-golden', will be available in build *201103190400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/31412426d730 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: Issue #196837 - NullPointerException at org.netbeans.libs.git.jgit.JGitMergeResult.getMergedCommits