I would throw an exception in these cases instead of indicating this state through the return value (the return value would be used to deal with "normal" conditions that can result from a merge operation, the exceptions are thrown when unexpected conditions occur..).

@ethomson @nulltoken - How do you guys feel about checking the above conditions (no changes in working directory, no repository operation). The git documentation discourages merging with uncommitted changes, but doesn't necessarily block it. Core git also doesn't seem to explicitly check and block if there is a current operation running (although it does complain if there are any uncommitted changes as part of the currently in progress operation), but I wouldn't think that (e.g. doing a merge while in the middle of a revert) is really an intended workflow... thoughts?