Skip to content
This repository
Browse code

Replaced all old-style flag variables by shFlags-style flag variables.

  • Loading branch information...
commit ca73caf8c5d8d2eab325ede3e1bd17fa127db91d 1 parent d099126
Vincent Driessen authored
2  git-flow-feature
@@ -174,7 +174,7 @@ cmd_start() {
174 174 }
175 175
176 176 cmd_finish() {
177   - DEFINE_boolean fetch false 'fetch from origin before performing local operation' F
  177 + DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
178 178 DEFINE_boolean rebase false 'rebase instead of merge' r
179 179 DEFINE_boolean squash false 'squash all commits when rebasing (implies --rebase)' s
180 180 parse_args "$@"
7 git-flow-hotfix
@@ -14,7 +14,6 @@
14 14
15 15 VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
16 16 PREFIX=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
17   -FLAG_FETCH=1
18 17
19 18 usage() {
20 19 echo "usage: git flow hotfix [list] [-v]"
@@ -114,6 +113,7 @@ require_base_is_on_master() {
114 113 }
115 114
116 115 cmd_start() {
  116 + DEFINE_boolean fetch true "fetch from $ORIGIN before finishing hotfix" F
117 117 parse_args "$@"
118 118 BASE="${2:-$MASTER_BRANCH}"
119 119 require_version_arg
@@ -121,7 +121,7 @@ cmd_start() {
121 121
122 122 # sanity checks
123 123 gitflow_require_clean_working_tree
124   - if [ $FLAG_FETCH -eq 1 ]; then
  124 + if flag fetch; then
125 125 git fetch -q $ORIGIN $MASTER_BRANCH
126 126 fi
127 127 gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
@@ -145,12 +145,13 @@ cmd_start() {
145 145 }
146 146
147 147 cmd_finish() {
  148 + DEFINE_boolean fetch true "fetch from $ORIGIN before finishing hotfix" F
148 149 parse_args "$@"
149 150 require_version_arg
150 151
151 152 # sanity checks
152 153 gitflow_require_clean_working_tree
153   - if [ $FLAG_FETCH -eq 1 ]; then
  154 + if flag fetch; then
154 155 git fetch -q $ORIGIN $MASTER_BRANCH
155 156 git fetch -q $ORIGIN $DEVELOP_BRANCH
156 157 fi
7 git-flow-release
@@ -14,7 +14,6 @@
14 14
15 15 VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
16 16 PREFIX=$(git config --get gitflow.prefix.release || echo release/)
17   -FLAG_FETCH=1
18 17
19 18 usage() {
20 19 echo "usage: git flow release [list] [-v]"
@@ -120,6 +119,7 @@ require_base_is_on_develop() {
120 119 }
121 120
122 121 cmd_start() {
  122 + DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
123 123 parse_args "$@"
124 124 BASE="${2:-$DEVELOP_BRANCH}"
125 125 require_version_arg
@@ -127,7 +127,7 @@ cmd_start() {
127 127
128 128 # sanity checks
129 129 gitflow_require_clean_working_tree
130   - if [ $FLAG_FETCH -eq 1 ]; then
  130 + if flag fetch; then
131 131 git fetch -q $ORIGIN $DEVELOP_BRANCH
132 132 fi
133 133 gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
@@ -151,12 +151,13 @@ cmd_start() {
151 151 }
152 152
153 153 cmd_finish() {
  154 + DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
154 155 parse_args "$@"
155 156 require_version_arg
156 157
157 158 # sanity checks
158 159 gitflow_require_clean_working_tree
159   - if [ $FLAG_FETCH -eq 1 ]; then
  160 + if flag fetch; then
160 161 git fetch -q $ORIGIN $MASTER_BRANCH
161 162 git fetch -q $ORIGIN $DEVELOP_BRANCH
162 163 fi
4 git-flow-support
@@ -14,7 +14,6 @@
14 14
15 15 VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
16 16 PREFIX=$(git config --get gitflow.prefix.support || echo support/)
17   -FLAG_FETCH=1
18 17
19 18 warn "note: The support subcommand is still very EXPERIMENTAL!"
20 19 warn "note: DO NOT use it in a production situation."
@@ -125,6 +124,7 @@ require_base_is_on_master() {
125 124 }
126 125
127 126 cmd_start() {
  127 + DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
128 128 parse_args "$@"
129 129 require_version_arg
130 130 require_base_arg
@@ -134,7 +134,7 @@ cmd_start() {
134 134 gitflow_require_clean_working_tree
135 135
136 136 # fetch remote changes
137   - if [ $FLAG_FETCH -eq 1 ]; then
  137 + if flag fetch; then
138 138 git fetch -q $ORIGIN $BASE
139 139 fi
140 140 gitflow_require_branch_absent $BRANCH

0 comments on commit ca73caf

Please sign in to comment.
Something went wrong with that request. Please try again.