Commit 6c9e8049 authored by Vincent Driessen's avatar Vincent Driessen

Add function gitflow_require_branch_absent(), to test for the *absence* of a branch.

parent a1bc8717
...@@ -50,6 +50,13 @@ gitflow_require_branch() { ...@@ -50,6 +50,13 @@ gitflow_require_branch() {
fi fi
} }
gitflow_require_branch_absent() {
echo "$ALL_BRANCHES" | grep "^$1\$" 2>/dev/null >/dev/null
if [ $? -eq 0 ]; then
die "Branch '$1' already exists."
fi
}
# #
# gitflow_test_branches_equal() # gitflow_test_branches_equal()
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment