Commit fda5507f authored by Vincent Driessen's avatar Vincent Driessen

Merge branch 'develop' into squash-option

parents 0c4d0bf0 f414f0ca
...@@ -138,7 +138,7 @@ Showing your appreciation ...@@ -138,7 +138,7 @@ Showing your appreciation
A few people already requested it, so now it's here: a Flattr button. A few people already requested it, so now it's here: a Flattr button.
Of course, the best way to show your appreciation for the original Of course, the best way to show your appreciation for the original
[blog post](http://nvie.com/git-model) or the git-flow tool itself remains [blog post](http://nvie.com/posts/a-successful-git-branching-model/) or the git-flow tool itself remains
contributing to the community. If you'd like to show your appreciation in contributing to the community. If you'd like to show your appreciation in
another way, however, consider Flattr'ing me: another way, however, consider Flattr'ing me:
......
...@@ -109,6 +109,9 @@ main() { ...@@ -109,6 +109,9 @@ main() {
fi fi
# run the specified action # run the specified action
if [ $SUBACTION != "help" ]; then
init
fi
cmd_$SUBACTION "$@" cmd_$SUBACTION "$@"
} }
......
...@@ -36,10 +36,12 @@ ...@@ -36,10 +36,12 @@
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
# #
require_git_repo init() {
require_gitflow_initialized require_git_repo
gitflow_load_settings require_gitflow_initialized
PREFIX=$(git config --get gitflow.prefix.feature) gitflow_load_settings
PREFIX=$(git config --get gitflow.prefix.feature)
}
usage() { usage() {
echo "usage: git flow feature [list] [-v]" echo "usage: git flow feature [list] [-v]"
...@@ -514,7 +516,7 @@ cmd_pull() { ...@@ -514,7 +516,7 @@ cmd_pull() {
exit 1 exit 1
fi fi
else else
it pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'."
fi fi
echo "Pulled $REMOTE's changes into $BRANCH." echo "Pulled $REMOTE's changes into $BRANCH."
......
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
# #
require_git_repo init() {
require_gitflow_initialized require_git_repo
gitflow_load_settings require_gitflow_initialized
VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") gitflow_load_settings
PREFIX=$(git config --get gitflow.prefix.hotfix) VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
PREFIX=$(git config --get gitflow.prefix.hotfix)
}
usage() { usage() {
echo "usage: git flow hotfix [list] [-v]" echo "usage: git flow hotfix [list] [-v]"
...@@ -221,6 +223,7 @@ cmd_finish() { ...@@ -221,6 +223,7 @@ cmd_finish() {
DEFINE_boolean sign false "sign the release tag cryptographically" s DEFINE_boolean sign false "sign the release tag cryptographically" s
DEFINE_string signingkey "" "use the given GPG-key for the digital signature (implies -s)" u DEFINE_string signingkey "" "use the given GPG-key for the digital signature (implies -s)" u
DEFINE_string message "" "use the given tag message" m DEFINE_string message "" "use the given tag message" m
DEFINE_string messagefile "" "use the contents of the given file as tag message" f
DEFINE_boolean push false "push to $ORIGIN after performing finish" p DEFINE_boolean push false "push to $ORIGIN after performing finish" p
DEFINE_boolean keep false "keep branch after performing finish" k DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean notag false "don't tag this release" n DEFINE_boolean notag false "don't tag this release" n
...@@ -269,6 +272,7 @@ cmd_finish() { ...@@ -269,6 +272,7 @@ cmd_finish() {
flag sign && opts="$opts -s" flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
[ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'"
eval git tag $opts "$VERSION_PREFIX$VERSION" || \ eval git tag $opts "$VERSION_PREFIX$VERSION" || \
die "Tagging failed. Please run finish again to retry." die "Tagging failed. Please run finish again to retry."
fi fi
......
...@@ -153,11 +153,17 @@ cmd_default() { ...@@ -153,11 +153,17 @@ cmd_default() {
default_suggestion= default_suggestion=
for guess in $(git config --get gitflow.branch.develop) \ for guess in $(git config --get gitflow.branch.develop) \
'develop' 'int' 'integration' 'master'; do 'develop' 'int' 'integration' 'master'; do
if git_local_branch_exists "$guess"; then if git_local_branch_exists "$guess" && [ "$guess" != "$master_branch" ]; then
default_suggestion="$guess" default_suggestion="$guess"
break break
fi fi
done done
if [ -z $default_suggestion ]; then
should_check_existence=NO
default_suggestion=$(git config --get gitflow.branch.develop || echo develop)
fi
fi fi
printf "Branch name for \"next release\" development: [$default_suggestion] " printf "Branch name for \"next release\" development: [$default_suggestion] "
......
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
# #
require_git_repo init() {
require_gitflow_initialized require_git_repo
gitflow_load_settings require_gitflow_initialized
VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") gitflow_load_settings
PREFIX=$(git config --get gitflow.prefix.release) VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
PREFIX=$(git config --get gitflow.prefix.release)
}
usage() { usage() {
echo "usage: git flow release [list] [-v]" echo "usage: git flow release [list] [-v]"
...@@ -190,6 +192,7 @@ cmd_finish() { ...@@ -190,6 +192,7 @@ cmd_finish() {
DEFINE_boolean sign false "sign the release tag cryptographically" s DEFINE_boolean sign false "sign the release tag cryptographically" s
DEFINE_string signingkey "" "use the given GPG-key for the digital signature (implies -s)" u DEFINE_string signingkey "" "use the given GPG-key for the digital signature (implies -s)" u
DEFINE_string message "" "use the given tag message" m DEFINE_string message "" "use the given tag message" m
DEFINE_string messagefile "" "use the contents of the given file as a tag message" f
DEFINE_boolean push false "push to $ORIGIN after performing finish" p DEFINE_boolean push false "push to $ORIGIN after performing finish" p
DEFINE_boolean keep false "keep branch after performing finish" k DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean notag false "don't tag this release" n DEFINE_boolean notag false "don't tag this release" n
...@@ -246,6 +249,7 @@ cmd_finish() { ...@@ -246,6 +249,7 @@ cmd_finish() {
flag sign && opts="$opts -s" flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
[ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'"
eval git tag $opts "$tagname" || \ eval git tag $opts "$tagname" || \
die "Tagging failed. Please run finish again to retry." die "Tagging failed. Please run finish again to retry."
fi fi
......
...@@ -36,11 +36,13 @@ ...@@ -36,11 +36,13 @@
# policies, either expressed or implied, of Vincent Driessen. # policies, either expressed or implied, of Vincent Driessen.
# #
require_git_repo init() {
require_gitflow_initialized require_git_repo
gitflow_load_settings require_gitflow_initialized
VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") gitflow_load_settings
PREFIX=$(git config --get gitflow.prefix.support) 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: The support subcommand is still very EXPERIMENTAL!"
warn "note: DO NOT use it in a production situation." warn "note: DO NOT use it in a production situation."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment