Patch Set 8: I would prefer that you didn't submit this; No score

Still there is an exception if the repository is in state conflict. If you try a "Replace With" on a file that is not the one that has a conflict there is an exception during repository.getIndex().write().

The problem is that GitIndex cannot handle more than one stage. The DirCache should be used for this in future.

Maybe for now just check the repository state if it is in state SAFE and show a dialog otherwise, or even disable the "replace with" action.