gitk: Parse arbitrary commit-ish in SHA1 field
gitk: Parse arbitrary commit-ish in SHA1 field

We only accepted either SHA1s or heads/tags that have been read.  This
meant the user could not, e.g., enter HEAD to go back to the current
commit.

This adds code to call out to git rev-parse --verify if all other
methods of interpreting the string the user entered fail.
(git-rev-parse alone is not enough as we really want a single
revision.)

The error paths change slighly, because we now know from the rev-parse
invocation whether the expression was valid at all.  The previous
"unknown" path is now only triggered if the revision does exist, but
is not in the current view display.

Signed-off-by: Thomas Rast <18f23ef7096473d837b7404952f13710423b8b63@student.ethz.ch>
Signed-off-by: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>

destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git