Log nothing if rev-parse fails
Do use prettify when intended
Fix detection of mapping to multiple hashes

A commit can also map to no other commits.
Be less chatty
Refactoring: reorder variables
Add missing type annotation
Abstract and use fail

Encapsulate most details of the type of errors.
Distinguish better the empty error from real ones

"An empty string is an error we should not display" is too
unclean/fragile (it's much easier to miss, for instance): it's an Option
which is not statically tracked (and therefore, not documented). Use a
real Option instead.

Thanks to the previous commit, which encapsulated to some extent the
representation of errors, this change is relatively small.