4 # Checks $GIT_DIR/locked and $GIT_DIR/preserved for branches that cannot be
8 . $(dirname $0)/functions
14 # We only care about branches
17 short_refname=${refname##refs/heads/}
24 if test -f "$GIT_DIR/locked" ; then
25 grep $short_refname "$GIT_DIR/locked"
26 if [ $? -eq 0 ] ; then
27 display_error_message "Branch $short_refname is locked"
32 if test -f "$GIT_DIR/preserved" ; then
33 grep $short_refname "$GIT_DIR/preserved"
34 if [ $? -eq 0 ] ; then
35 display_error_message "Branch $short_refname cannot be deleted"