Skip to content

Commit

Permalink
Replaced all old-style flag variables by shFlags-style flag variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Feb 7, 2010
1 parent d099126 commit ca73caf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion git-flow-feature
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ cmd_start() {
}

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 "$@"
Expand Down
7 changes: 4 additions & 3 deletions git-flow-hotfix
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down Expand Up @@ -114,14 +113,15 @@ require_base_is_on_master() {
}

cmd_start() {
DEFINE_boolean fetch true "fetch from $ORIGIN before finishing hotfix" F
parse_args "$@"
BASE="${2:-$MASTER_BRANCH}"
require_version_arg
require_base_is_on_master

# 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
Expand All @@ -145,12 +145,13 @@ cmd_start() {
}

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
Expand Down
7 changes: 4 additions & 3 deletions git-flow-release
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
Expand Down Expand Up @@ -120,14 +119,15 @@ require_base_is_on_develop() {
}

cmd_start() {
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
BASE="${2:-$DEVELOP_BRANCH}"
require_version_arg
require_base_is_on_develop

# 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
Expand All @@ -151,12 +151,13 @@ cmd_start() {
}

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
Expand Down
4 changes: 2 additions & 2 deletions git-flow-support
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -125,6 +124,7 @@ require_base_is_on_master() {
}

cmd_start() {
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
require_version_arg
require_base_arg
Expand All @@ -134,7 +134,7 @@ cmd_start() {
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
Expand Down

0 comments on commit ca73caf

Please sign in to comment.