|NPE when using MergeCommand and StrategySimpleTwoWayInCore with conflicting commits [message #1010710]
||Mon, 18 February 2013 04:38
| Daniel Suskin
Registered: February 2013
I'm working on using JGit in an application which will version image files. For merges, I'd like to simply write the "theirs" and "ours" versions of conflicting files to the filesystem so that the user can resolve the conflict.
To achieve this, I'm attempting to use a MergeCommand with its strategy set to MergeStrategy.SIMPLE_TWO_WAY_IN_CORE, since the strategy appears to treat any file differences as conflicts, and that is exactly what I want. However, when I execute a merge, I get a NullPointerException if there is a conflict:
I'm using JGit version 184.108.40.206212191850-r.
The immediate cause appears to be that some local variables in MergeCommand#call() are left as null unless the merge strategy is set to MergeStrategy.RESOLVE.
I checked around in the forums, jgit-dev list, and the Bugzilla, but I didn't notice anything related.
Am I using the merge strategy and MergeCommand class correctly? Should I be going about this in a different way?
Thanks for your help!
Powered by FUDForum
. Page generated in 0.02211 seconds