revparse: Don't return a reference when asked for a git object

Fix #1722