How do I verify if the given argument is a syntactically legal commit-ish or a syntactically legal revision range?
I have a bunch of Bash scripts that are git wrappers. Most of the scripts should use commit-ish and revision ranges. I have hard time to figure out how I can verify if the given arguments meet these needs syntactically, otherwise the scripts should reject the given arguments and terminate with a non-zero exit code, for instance not to clash with git-rev-list parameters and not to be able to be injected as other commands switches.