Re: [PATCH v2] gitk: parse arbitrary commit-ish in SHA1 field
Show 14 quoted lines
> 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.
>
> Add code to call out to git rev-parse --verify with the string entered
> if all other methods of interpreting it failed. (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 <trast@student.ethz.ch>