How to validate whether the commit with given sha exists in current branch?
There are many ways to parse outputs, but I need optimal way which returns boolean (for usage in bash script).
e.g.
sha=$1 if [ -z `git magic --validate $sha` ]; then echo "Invalid commit sha: $sha" exit 1 fi