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.
Build: NetBeans IDE Dev (Build 20130628-216d1bc31969) VM: Java HotSpot(TM) 64-Bit Server VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b11 OS: Windows 7 User Comments: misterm: Git -> Pull from Upstream... misterm: . Stacktrace: java.lang.NullPointerException at org.eclipse.jgit.transport.RefSpec.<init>(RefSpec.java:125) at org.eclipse.jgit.transport.RemoteConfig.<init>(RemoteConfig.java:186) at org.eclipse.jgit.transport.RemoteConfig.getAllRemoteConfigs(RemoteConfig.java:124) at org.netbeans.libs.git.jgit.commands.GetRemotesCommand.run(GetRemotesCommand.java:72) at org.netbeans.libs.git.jgit.commands.GitCommand.execute(GitCommand.java:72) at org.netbeans.libs.git.GitClient.getRemotes(GitClient.java:678)
Created attachment 136474 [details] stacktrace
I've figured out I had a line with: fetch = but still the IDE is not supposed to throw a NPE.
Any steps to reproduce? Did you make any manual changes to .git/config file? What did you select in both pull wizard's panels?
(In reply to comment #2) > I've figured out I had a line with: > fetch = ok, thanks
Sorry, wontfix. The exception does not come from NetBeans but from the JGit library we use as a client implementation, it does not expect "fetch=" in .git/config. I could catch the exception and show some pretty user-friendly dialog but i don't think it's a good idea. This way i could pollute our code in many places where a NPE could occur and in time it would become unmaintainable. Besides i don't think catching a NPE is a good practice. You manually edited the config file, be prepared for unexpected situations. If you still think it should be fixed you can file a bug to JGit itself, but honestly i doubt they will be eager to change their parsing algorithm to avoid this. The relevant code is: http://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java?id=v2.3.1.201302201838-r#n1239 where "null" is returned when the read value is empty
(In reply to comment #5) > You manually edited the config file, be prepared for unexpected situations. Fair enough, I will file a bug for the reason I had to edit the config file, which makes more sense.