commit | 6c9e8049a95e320726ab36a04f52190a05f2e561 | [log] [tgz] |
---|---|---|
author | Vincent Driessen <vincent@datafox.nl> | 周一 1月 25 21:59:10 2010 +0100 |
committer | Vincent Driessen <vincent@datafox.nl> | 周一 1月 25 21:59:10 2010 +0100 |
tree | 02055584f1ce802be03d6fe33391411b209f5155 | |
parent | a1bc8717e2cc2fc60105f614ab71486f50c8ea67 [diff] [blame] |
Add function gitflow_require_branch_absent(), to test for the *absence* of a branch.
diff --git a/gitflow-sh-setup b/gitflow-sh-setup index 3181c3f..f24025d 100755 --- a/gitflow-sh-setup +++ b/gitflow-sh-setup
@@ -50,6 +50,13 @@ 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() #