Replaced all old-style flag variables by shFlags-style flag variables.
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