rev-parse: Add support for the ^! and ^@ syntax