I recently updated to Eclipse 2023-03.
Now I get a NullPointerException on each push or pull in my git repository.
The error log shows this:
java.lang.NullPointerException: Cannot invoke "java.lang.Enum.toString()" because "defaultValue" is null
at org.eclipse.egit.core.internal.ReportingTypedConfigGetter.getEnum(ReportingTypedConfigGetter.java:59)
at org.eclipse.jgit.lib.Config.getEnum(Config.java:449)
at org.eclipse.jgit.api.PullCommand.getRebaseMode(PullCommand.java:534)
Sometimes I only see it in the error log and nothing happens when pressing Pull or Push.
As I can see, it has something to do with the rebase mode (which is configured in the branch). But I can't open the Branch configuration... from the context menu of the branch either, because of the same exception.
This is a known bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=581806
The value
preservefor therebaseproperty was renamed tomergesand the configuration stumbles if it finds the old value in the current branch.If you replace
preservewithmergesin the properties of the repository for each branch, push and pull will work again.