exit 0
fi
-# The tip must always be new
-already=$(git branch --contains "$newrev")
-if [ "$already" != "" ] ; then
- already=${already## }
- echo "----------------------------------------------------"
- echo
- echo "$short_refname is already referred to by $already"
- echo
- echo "----------------------------------------------------"
- exit 1
-fi
+# # The tip must always be new
+# already=$(git branch --contains "$newrev")
+# if [ "$already" != "" ] ; then
+# already=${already## }
+# echo "----------------------------------------------------"
+# echo
+# echo "$short_refname is already referred to by $already"
+# echo
+# echo "----------------------------------------------------"
+# exit 1
+#fi
if [ "$short_refname" == "stable" ] ; then
# Stable enforcement
esac
# Check if topic is already in candidates
- candidate=$(git branch --contains "$oldrev" | grep -oP candidate.* --max-count=1)
+ candidate=$(git branch --contains "$oldrev" | grep -oP "candidate.*" --max-count=1)
if [ $? -eq 0 ] ; then
echo "----------------------------------------------------"
echo
git push origin topic3
'
-test_expect_success 'topic4 cannot point to the same place as topic4' '
+test_expect_failure 'topic4 cannot point to the same place as topic4' '
git checkout -b topic4 topic3 &&
echo "$test_name" >a.topic4 &&
git add a.topic4 &&