git/hooks: Improve an error message
This commit is contained in:
parent
3ed1da51ca
commit
ec1d144ab0
1 changed files with 8 additions and 3 deletions
|
@ -4,7 +4,12 @@
|
||||||
# https://fedorahosted.org/rel-eng/ticket/4071
|
# https://fedorahosted.org/rel-eng/ticket/4071
|
||||||
|
|
||||||
refname="${1}"
|
refname="${1}"
|
||||||
sha1_old="${2}"
|
|
||||||
sha1_new="${3}"
|
|
||||||
|
|
||||||
echo "${refname}" | grep -qE '^refs/heads/origin/' && exit 1 || exit 0
|
echo "${refname}" | grep -qE '^refs/heads/origin/'
|
||||||
|
|
||||||
|
if [ $? == 0 ]; then
|
||||||
|
echo "Can't push a branch named $refname"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue