Patch Set 2:

Take a look at this:

http://code.google.com/p/gerrit/issues/detail?id=927

(test-case.sh is attached there)

Before this change jgit would produce mismerge, now it is null pointer exception.