Permalink
Browse files

Merge pull request #211 from pcragone/develop

Added 'init()' function to git-flow-{feature,release,hotfix,support}
  • Loading branch information...
2 parents c072ff6 + dc902ed commit f414f0cab6573e1ac54d489af20327c1c91094e7 @nvie committed Jul 9, 2012
Showing with 31 additions and 20 deletions.
  1. +4 −1 git-flow
  2. +6 −4 git-flow-feature
  3. +7 −5 git-flow-hotfix
  4. +7 −5 git-flow-release
  5. +7 −5 git-flow-support
View
5 git-flow
@@ -109,7 +109,10 @@ main() {
fi
# run the specified action
- cmd_$SUBACTION "$@"
+ if [ $SUBACTION != "help" ]; then
+ init
@oddnoc
oddnoc added a line comment Jul 9, 2012

This line causes an error message when doing, for example, "git flow init -fd": "line 113: init: command not found"

@petervanderdoes
petervanderdoes added a line comment Jul 10, 2012

Line 112 should read:
if [ $SUBACTION != "help" ] && [ $SUBCOMMAND != "init" ] ; then

As the init command does not have the init function, nor does it need one.

@oddnoc
oddnoc added a line comment Jul 10, 2012

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ fi
+ cmd_$SUBACTION "$@"
}
main "$@"
View
10 git-flow-feature
@@ -36,10 +36,12 @@
# policies, either expressed or implied, of Vincent Driessen.
#
-require_git_repo
-require_gitflow_initialized
-gitflow_load_settings
-PREFIX=$(git config --get gitflow.prefix.feature)
+init() {
+ require_git_repo
+ require_gitflow_initialized
+ gitflow_load_settings
+ PREFIX=$(git config --get gitflow.prefix.feature)
+}
usage() {
echo "usage: git flow feature [list] [-v]"
View
12 git-flow-hotfix
@@ -36,11 +36,13 @@
# policies, either expressed or implied, of Vincent Driessen.
#
-require_git_repo
-require_gitflow_initialized
-gitflow_load_settings
-VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
-PREFIX=$(git config --get gitflow.prefix.hotfix)
+init() {
+ require_git_repo
+ require_gitflow_initialized
+ gitflow_load_settings
+ VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
+ PREFIX=$(git config --get gitflow.prefix.hotfix)
+}
usage() {
echo "usage: git flow hotfix [list] [-v]"
View
12 git-flow-release
@@ -36,11 +36,13 @@
# policies, either expressed or implied, of Vincent Driessen.
#
-require_git_repo
-require_gitflow_initialized
-gitflow_load_settings
-VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
-PREFIX=$(git config --get gitflow.prefix.release)
+init() {
+ require_git_repo
+ require_gitflow_initialized
+ gitflow_load_settings
+ VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
+ PREFIX=$(git config --get gitflow.prefix.release)
+}
usage() {
echo "usage: git flow release [list] [-v]"
View
12 git-flow-support
@@ -36,11 +36,13 @@
# policies, either expressed or implied, of Vincent Driessen.
#
-require_git_repo
-require_gitflow_initialized
-gitflow_load_settings
-VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
-PREFIX=$(git config --get gitflow.prefix.support)
+init() {
+ require_git_repo
+ require_gitflow_initialized
+ gitflow_load_settings
+ VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
+ PREFIX=$(git config --get gitflow.prefix.support)
+}
warn "note: The support subcommand is still very EXPERIMENTAL!"
warn "note: DO NOT use it in a production situation."

0 comments on commit f414f0c

Please sign in to comment.