Use cond for better readability
Support unstaging renames

This will fail if a whole directory has been renamed, e.g.:

 $ git mv docs documentation
 $ git status
 [...]
 ... 	renamed:    docs/HISTORY.rst -> documentation/HISTORY.rst

As git doesn't tracks files and not directories, after `git mv` has
moved the files and deleted the `docs` directory no trace is left that
the intention was to rename a directory. If now it is told to rename
one file:

 $ git mv documentation/HISTORY.rst docs/HISTORY.rst
 fatal: renaming 'documentation/HISTORY.rst' failed: No such file or directory

The only reliable way would be to issue:

 $ git mv documentation docs

But we have no way to get from git when that is what is needed to
unstage the rename.