Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tools
gitflow
Commits
6d64d2c3
Commit
6d64d2c3
authored
Feb 16, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check to disallow creation of a new release/hotfix branch when there
still exists one.
parent
13c94821
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
git-flow-hotfix
git-flow-hotfix
+9
-0
git-flow-release
git-flow-release
+9
-0
No files found.
git-flow-hotfix
View file @
6d64d2c3
...
@@ -112,12 +112,21 @@ require_base_is_on_master() {
...
@@ -112,12 +112,21 @@ require_base_is_on_master() {
fi
fi
}
}
require_no_existing_hotfix_branches() {
local hotfix_branches=$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")
local first_branch=$(echo ${hotfix_branches} | head -n1)
first_branch=${first_branch#$PREFIX}
[ -z "$hotfix_branches" ] || \
die "There is an existing hotfix branch ($first_branch). Finish that one first."
}
cmd_start() {
cmd_start() {
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
parse_args "$@"
BASE=${2:-$MASTER_BRANCH}
BASE=${2:-$MASTER_BRANCH}
require_version_arg
require_version_arg
require_base_is_on_master
require_base_is_on_master
require_no_existing_hotfix_branches
# sanity checks
# sanity checks
gitflow_require_clean_working_tree
gitflow_require_clean_working_tree
...
...
git-flow-release
View file @
6d64d2c3
...
@@ -118,12 +118,21 @@ require_base_is_on_develop() {
...
@@ -118,12 +118,21 @@ require_base_is_on_develop() {
fi
fi
}
}
require_no_existing_release_branches() {
local release_branches=$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")
local first_branch=$(echo ${release_branches} | head -n1)
first_branch=${first_branch#$PREFIX}
[ -z "$release_branches" ] || \
die "There is an existing release branch ($first_branch). Finish that one first."
}
cmd_start() {
cmd_start() {
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
DEFINE_boolean fetch true "fetch from $ORIGIN before performing finish" F
parse_args "$@"
parse_args "$@"
BASE=${2:-$DEVELOP_BRANCH}
BASE=${2:-$DEVELOP_BRANCH}
require_version_arg
require_version_arg
require_base_is_on_develop
require_base_is_on_develop
require_no_existing_release_branches
# sanity checks
# sanity checks
gitflow_require_clean_working_tree
gitflow_require_clean_working_tree
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment