is this really a MergeFailureReason? This class is used also during normal checkouts, resets, ...and it sounds strange to me that we have to import org.eclipse.jgit.merge.ResolveMerger when I want understand the exceptions thrown by a checkout.

One example: during the merge operation we don't like dirty indexes and publish MergeFailureReason.DIRTY_INDEX. But here, in the DirCacheCheckout, a dirty index alone is not a reason to fail. You can checkout succesfully although your index is dirty.

My suggestion: Let's introduce a CheckoutFailureReason located in org.eclipse.jgit.dircache.