tj.git-extras/bin/git-has

7 lines
171 B
Bash
Executable file

#!/bin/sh
commit=$1
test -z $commit && echo "<commit> required" 1>&2 && exit 1
git branch --contains $commit | grep "*" > /dev/null && echo yes && exit
echo no && exit 1