Added git-has(1) to check if a commit is present in the current branch

This commit is contained in:
TJ Holowaychuk 2012-06-21 15:26:42 -07:00
parent 0c693b9244
commit 9bfe4af5db

6
bin/git-has Executable file
View file

@ -0,0 +1,6 @@
#!/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