Change the default behaviour of all scripts to NOT fetch.
This already was the default behaviour of git-flow-feature, but now it is the default for the other scripts, too. RATIONALE: Due to limitations on some platforms (and some implementations of getopt), it's impossible to turn off the -f (fetch) option. Therefore, it must now be set explicitly. Also, this makes git-flow work in stand-alone repositories (i.e. repos that do not have an origin remote at all).
This commit is contained in:
parent
ec0b854b3e
commit
de95e004ab
3 changed files with 23 additions and 11 deletions
|
@ -153,7 +153,7 @@ require_no_existing_hotfix_branches() {
|
|||
}
|
||||
|
||||
cmd_start() {
|
||||
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
|
||||
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
|
||||
parse_args "$@"
|
||||
BASE=${2:-$MASTER_BRANCH}
|
||||
require_version_arg
|
||||
|
@ -167,7 +167,9 @@ cmd_start() {
|
|||
if flag fetch; then
|
||||
git fetch -q "$ORIGIN" "$MASTER_BRANCH"
|
||||
fi
|
||||
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
|
||||
if has "$ORIGIN/$MASTER_BRANCH" "$(git_remote_branches)"; then
|
||||
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
|
||||
fi
|
||||
|
||||
# create branch
|
||||
git checkout -b "$BRANCH" "$BASE"
|
||||
|
@ -187,7 +189,7 @@ cmd_start() {
|
|||
}
|
||||
|
||||
cmd_finish() {
|
||||
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
|
||||
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
|
||||
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 message "" "use the given tag message" m
|
||||
|
@ -209,8 +211,12 @@ cmd_finish() {
|
|||
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \
|
||||
die "Could not fetch $DEVELOP_BRANCH from $ORIGIN."
|
||||
fi
|
||||
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
|
||||
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
|
||||
if has "$ORIGIN/$MASTER_BRANCH" "$(git_remote_branches)"; then
|
||||
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
|
||||
fi
|
||||
if has "$ORIGIN/$DEVELOP_BRANCH" "$(git_remote_branches)"; then
|
||||
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
|
||||
fi
|
||||
|
||||
# try to merge into master
|
||||
# in case a previous attempt to finish this release branch has failed,
|
||||
|
|
|
@ -148,7 +148,7 @@ require_no_existing_release_branches() {
|
|||
}
|
||||
|
||||
cmd_start() {
|
||||
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
|
||||
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
|
||||
parse_args "$@"
|
||||
BASE=${2:-$DEVELOP_BRANCH}
|
||||
require_version_arg
|
||||
|
@ -162,7 +162,9 @@ cmd_start() {
|
|||
if flag fetch; then
|
||||
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH"
|
||||
fi
|
||||
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
|
||||
if has "$ORIGIN/$DEVELOP_BRANCH" "$(git_remote_branches)"; then
|
||||
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
|
||||
fi
|
||||
|
||||
# create branch
|
||||
git checkout -b "$BRANCH" "$BASE"
|
||||
|
@ -182,7 +184,7 @@ cmd_start() {
|
|||
}
|
||||
|
||||
cmd_finish() {
|
||||
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
|
||||
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
|
||||
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 message "" "use the given tag message" m
|
||||
|
@ -205,8 +207,12 @@ cmd_finish() {
|
|||
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \
|
||||
die "Could not fetch $DEVELOP_BRANCH from $ORIGIN."
|
||||
fi
|
||||
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
|
||||
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
|
||||
if has "$ORIGIN/$MASTER_BRANCH" "$(git_remote_branches)"; then
|
||||
require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH"
|
||||
fi
|
||||
if has "$ORIGIN/$DEVELOP_BRANCH" "$(git_remote_branches)"; then
|
||||
require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
|
||||
fi
|
||||
|
||||
# try to merge into master
|
||||
# in case a previous attempt to finish this release branch has failed,
|
||||
|
|
|
@ -156,7 +156,7 @@ require_base_is_on_master() {
|
|||
}
|
||||
|
||||
cmd_start() {
|
||||
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
|
||||
DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F
|
||||
parse_args "$@"
|
||||
require_version_arg
|
||||
require_base_arg
|
||||
|
|
Loading…
Reference in a new issue