When the index is dirty, return GIT_EINDEXDIRTY so that consumers can identify the exact problem programatically.