mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
15 lines
246 B
Plaintext
15 lines
246 B
Plaintext
#
|
|
# check whether current directory contains any git commit
|
|
#
|
|
|
|
has_git_commit() {
|
|
git rev-parse --short HEAD > /dev/null 2>&1
|
|
result=$?
|
|
if test $result != 0; then
|
|
>&2 echo 'Not git commit found!'
|
|
exit $result
|
|
fi
|
|
}
|
|
|
|
has_git_commit
|