NPE when pulling or pushing with Eclipse

68 Views Asked by At

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.

1

There are 1 best solutions below

0
Tobias Liefke On

This is a known bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=581806

The value preserve for the rebase property was renamed to merges and the configuration stumbles if it finds the old value in the current branch.

If you replace preserve with merges in the properties of the repository for each branch, push and pull will work again.