Commit 48386441 authored by Vincent Driessen's avatar Vincent Driessen

Replace gitflow_check_ prefixes by gitflow_require_ prefixes, for consistency.

parent 278884b5
...@@ -83,7 +83,7 @@ main() { ...@@ -83,7 +83,7 @@ main() {
cmd_$SUBACTION "$@" cmd_$SUBACTION "$@"
} }
gitflow_check_clean_working_tree() { gitflow_require_clean_working_tree() {
if ! git diff --no-ext-diff --ignore-submodules --quiet --exit-code; then if ! git diff --no-ext-diff --ignore-submodules --quiet --exit-code; then
die "Working tree contains unstaged changes. Aborting ..." die "Working tree contains unstaged changes. Aborting ..."
fi fi
......
...@@ -69,7 +69,7 @@ cmd_start() { ...@@ -69,7 +69,7 @@ cmd_start() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
gitflow_require_branch_absent $BRANCH gitflow_require_branch_absent $BRANCH
if [ "$BASE" = "$DEVELOP_BRANCH" ]; then if [ "$BASE" = "$DEVELOP_BRANCH" ]; then
git fetch -q $ORIGIN $DEVELOP_BRANCH git fetch -q $ORIGIN $DEVELOP_BRANCH
...@@ -94,7 +94,7 @@ cmd_finish() { ...@@ -94,7 +94,7 @@ cmd_finish() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
gitflow_require_branch $BRANCH gitflow_require_branch $BRANCH
git fetch -q $ORIGIN git fetch -q $ORIGIN
if has $ORIGIN/$BRANCH $REMOTE_BRANCHES; then if has $ORIGIN/$BRANCH $REMOTE_BRANCHES; then
...@@ -130,7 +130,7 @@ cmd_publish() { ...@@ -130,7 +130,7 @@ cmd_publish() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
gitflow_require_branch $BRANCH gitflow_require_branch $BRANCH
git fetch -q $ORIGIN git fetch -q $ORIGIN
gitflow_require_branch_absent $ORIGIN/$BRANCH gitflow_require_branch_absent $ORIGIN/$BRANCH
...@@ -156,7 +156,7 @@ cmd_track() { ...@@ -156,7 +156,7 @@ cmd_track() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
gitflow_require_branch_absent $BRANCH gitflow_require_branch_absent $BRANCH
git fetch -q $ORIGIN git fetch -q $ORIGIN
gitflow_require_branch $ORIGIN/$BRANCH gitflow_require_branch $ORIGIN/$BRANCH
......
...@@ -63,7 +63,7 @@ cmd_start() { ...@@ -63,7 +63,7 @@ cmd_start() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
git fetch -q $ORIGIN git fetch -q $ORIGIN
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
gitflow_require_branch_absent $BRANCH gitflow_require_branch_absent $BRANCH
...@@ -89,7 +89,7 @@ cmd_finish() { ...@@ -89,7 +89,7 @@ cmd_finish() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
git fetch -q $ORIGIN $MASTER_BRANCH git fetch -q $ORIGIN $MASTER_BRANCH
git fetch -q $ORIGIN $DEVELOP_BRANCH git fetch -q $ORIGIN $DEVELOP_BRANCH
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
......
...@@ -40,7 +40,7 @@ cmd_default() { ...@@ -40,7 +40,7 @@ cmd_default() {
die "Cannot find your master branch. Try: git branch -m <mymaster> $MASTER_BRANCH" die "Cannot find your master branch. Try: git branch -m <mymaster> $MASTER_BRANCH"
fi fi
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
if git remote | grep -q $ORIGIN; then if git remote | grep -q $ORIGIN; then
git fetch -q $ORIGIN git fetch -q $ORIGIN
......
...@@ -64,7 +64,7 @@ cmd_start() { ...@@ -64,7 +64,7 @@ cmd_start() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
git fetch -q $ORIGIN git fetch -q $ORIGIN
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
gitflow_require_branch_absent $BRANCH gitflow_require_branch_absent $BRANCH
...@@ -90,7 +90,7 @@ cmd_finish() { ...@@ -90,7 +90,7 @@ cmd_finish() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
git fetch -q $ORIGIN git fetch -q $ORIGIN
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
......
...@@ -53,7 +53,7 @@ cmd_start() { ...@@ -53,7 +53,7 @@ cmd_start() {
parse_args "$@" parse_args "$@"
# sanity checks # sanity checks
gitflow_check_clean_working_tree gitflow_require_clean_working_tree
# create branch # create branch
git checkout -b $BRANCH $BASE git checkout -b $BRANCH $BASE
......
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