Replaced all old-style flag variables by shFlags-style flag variables.
diff --git a/git-flow-feature b/git-flow-feature
index d00fd1a..bd0fe85 100644
--- a/git-flow-feature
+++ b/git-flow-feature
@@ -174,7 +174,7 @@
}
cmd_finish() {
- DEFINE_boolean fetch false 'fetch from origin before performing local operation' F
+ DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
DEFINE_boolean rebase false 'rebase instead of merge' r
DEFINE_boolean squash false 'squash all commits when rebasing (implies --rebase)' s
parse_args "$@"
diff --git a/git-flow-hotfix b/git-flow-hotfix
index 35fed5b..7ffa39b 100644
--- a/git-flow-hotfix
+++ b/git-flow-hotfix
@@ -14,7 +14,6 @@
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
PREFIX=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
-FLAG_FETCH=1
usage() {
echo "usage: git flow hotfix [list] [-v]"
@@ -114,6 +113,7 @@
}
cmd_start() {
+ DEFINE_boolean fetch true "fetch from $ORIGIN before finishing hotfix" F
parse_args "$@"
BASE="${2:-$MASTER_BRANCH}"
require_version_arg
@@ -121,7 +121,7 @@
# sanity checks
gitflow_require_clean_working_tree
- if [ $FLAG_FETCH -eq 1 ]; then
+ if flag fetch; then
git fetch -q $ORIGIN $MASTER_BRANCH
fi
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
@@ -145,12 +145,13 @@
}
cmd_finish() {
+ DEFINE_boolean fetch true "fetch from $ORIGIN before finishing hotfix" F
parse_args "$@"
require_version_arg
# sanity checks
gitflow_require_clean_working_tree
- if [ $FLAG_FETCH -eq 1 ]; then
+ if flag fetch; then
git fetch -q $ORIGIN $MASTER_BRANCH
git fetch -q $ORIGIN $DEVELOP_BRANCH
fi
diff --git a/git-flow-release b/git-flow-release
index b23914e..8fb4061 100644
--- a/git-flow-release
+++ b/git-flow-release
@@ -14,7 +14,6 @@
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
PREFIX=$(git config --get gitflow.prefix.release || echo release/)
-FLAG_FETCH=1
usage() {
echo "usage: git flow release [list] [-v]"
@@ -120,6 +119,7 @@
}
cmd_start() {
+ DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
BASE="${2:-$DEVELOP_BRANCH}"
require_version_arg
@@ -127,7 +127,7 @@
# sanity checks
gitflow_require_clean_working_tree
- if [ $FLAG_FETCH -eq 1 ]; then
+ if flag fetch; then
git fetch -q $ORIGIN $DEVELOP_BRANCH
fi
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
@@ -151,12 +151,13 @@
}
cmd_finish() {
+ DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
require_version_arg
# sanity checks
gitflow_require_clean_working_tree
- if [ $FLAG_FETCH -eq 1 ]; then
+ if flag fetch; then
git fetch -q $ORIGIN $MASTER_BRANCH
git fetch -q $ORIGIN $DEVELOP_BRANCH
fi
diff --git a/git-flow-support b/git-flow-support
index 5dd07d8..2edd46e 100644
--- a/git-flow-support
+++ b/git-flow-support
@@ -14,7 +14,6 @@
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
PREFIX=$(git config --get gitflow.prefix.support || echo support/)
-FLAG_FETCH=1
warn "note: The support subcommand is still very EXPERIMENTAL!"
warn "note: DO NOT use it in a production situation."
@@ -125,6 +124,7 @@
}
cmd_start() {
+ DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
require_version_arg
require_base_arg
@@ -134,7 +134,7 @@
gitflow_require_clean_working_tree
# fetch remote changes
- if [ $FLAG_FETCH -eq 1 ]; then
+ if flag fetch; then
git fetch -q $ORIGIN $BASE
fi
gitflow_require_branch_absent $BRANCH