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