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
49dd62b7
Commit
49dd62b7
authored
Jan 28, 2010
by
Benedikt Böhm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor git config calls to global variables
parent
7672d99d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
14 deletions
+10
-14
git-flow-feature
git-flow-feature
+2
-3
git-flow-hotfix
git-flow-hotfix
+2
-3
git-flow-release
git-flow-release
+3
-4
git-flow-support
git-flow-support
+3
-4
No files found.
git-flow-feature
View file @
49dd62b7
...
@@ -12,6 +12,8 @@
...
@@ -12,6 +12,8 @@
# Copyright (c) 2010 by Benedikt Böhm
# Copyright (c) 2010 by Benedikt Böhm
#
#
PREFIX=$(git config --get gitflow.prefix.feature || echo feature/)
usage() {
usage() {
echo "usage: git flow feature"
echo "usage: git flow feature"
echo " git flow feature start <name> [<base>]"
echo " git flow feature start <name> [<base>]"
...
@@ -42,13 +44,10 @@ parse_args() {
...
@@ -42,13 +44,10 @@ parse_args() {
usage
usage
exit 1
exit 1
fi
fi
PREFIX=$(git config --get gitflow.prefix.feature || echo feature/)
BRANCH=$PREFIX$NAME
BRANCH=$PREFIX$NAME
}
}
cmd_default() {
cmd_default() {
# TODO: Refactor getting this prefix into a general function
PREFIX=$(git config --get gitflow.prefix.feature || echo feature/)
FEATURE_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
FEATURE_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
if [ -z "$FEATURE_BRANCHES" ]; then
if [ -z "$FEATURE_BRANCHES" ]; then
warn "No feature branches exist."
warn "No feature branches exist."
...
...
git-flow-hotfix
View file @
49dd62b7
...
@@ -12,6 +12,8 @@
...
@@ -12,6 +12,8 @@
# Copyright (c) 2010 by Benedikt Böhm
# Copyright (c) 2010 by Benedikt Böhm
#
#
PREFIX=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
usage() {
usage() {
echo "usage: git flow hotfix"
echo "usage: git flow hotfix"
echo " git flow hotfix start <version> [<base>]"
echo " git flow hotfix start <version> [<base>]"
...
@@ -36,13 +38,10 @@ parse_args() {
...
@@ -36,13 +38,10 @@ parse_args() {
usage
usage
exit 1
exit 1
fi
fi
PREFIX=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
BRANCH=$PREFIX$VERSION
BRANCH=$PREFIX$VERSION
}
}
cmd_default() {
cmd_default() {
# TODO: Refactor getting this prefix into a general function
PREFIX=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
HOTFIX_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
HOTFIX_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
if [ -z "$HOTFIX_BRANCHES" ]; then
if [ -z "$HOTFIX_BRANCHES" ]; then
warn "No hotfix branches exist."
warn "No hotfix branches exist."
...
...
git-flow-release
View file @
49dd62b7
...
@@ -12,6 +12,9 @@
...
@@ -12,6 +12,9 @@
# Copyright (c) 2010 by Benedikt Böhm
# Copyright (c) 2010 by Benedikt Böhm
#
#
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
PREFIX=$(git config --get gitflow.prefix.release || echo release/)
usage() {
usage() {
echo "usage: git flow release"
echo "usage: git flow release"
echo " git flow release start <version>"
echo " git flow release start <version>"
...
@@ -30,20 +33,16 @@ usage() {
...
@@ -30,20 +33,16 @@ usage() {
}
}
parse_args() {
parse_args() {
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
VERSION="$1"
VERSION="$1"
if [ "$VERSION" = "" ]; then
if [ "$VERSION" = "" ]; then
echo "Missing argument <version>."
echo "Missing argument <version>."
usage
usage
exit 1
exit 1
fi
fi
PREFIX=$(git config --get gitflow.prefix.release || echo release/)
BRANCH=$PREFIX$VERSION
BRANCH=$PREFIX$VERSION
}
}
cmd_default() {
cmd_default() {
# TODO: Refactor getting this prefix into a general function
PREFIX=$(git config --get gitflow.prefix.release || echo release/)
RELEASE_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
RELEASE_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
if [ -z "$RELEASE_BRANCHES" ]; then
if [ -z "$RELEASE_BRANCHES" ]; then
warn "No release branches exist."
warn "No release branches exist."
...
...
git-flow-support
View file @
49dd62b7
...
@@ -12,13 +12,15 @@
...
@@ -12,13 +12,15 @@
# Copyright (c) 2010 by Benedikt Böhm
# Copyright (c) 2010 by Benedikt Böhm
#
#
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
PREFIX=$(git config --get gitflow.prefix.support || echo support/)
usage() {
usage() {
echo "usage: git flow support"
echo "usage: git flow support"
echo " git flow support start <version> [<base>]"
echo " git flow support start <version> [<base>]"
}
}
parse_args() {
parse_args() {
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
VERSION="$1"
VERSION="$1"
BASE="${2:-${VERSION_PREFIX}${VERSION}}"
BASE="${2:-${VERSION_PREFIX}${VERSION}}"
if [ "$VERSION" = "" ]; then
if [ "$VERSION" = "" ]; then
...
@@ -26,13 +28,10 @@ parse_args() {
...
@@ -26,13 +28,10 @@ parse_args() {
usage
usage
exit 1
exit 1
fi
fi
PREFIX=$(git config --get gitflow.prefix.support || echo support/)
BRANCH=$PREFIX$VERSION
BRANCH=$PREFIX$VERSION
}
}
cmd_default() {
cmd_default() {
# TODO: Refactor getting this prefix into a general function
PREFIX=$(git config --get gitflow.prefix.support || echo support/)
SUPPORT_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
SUPPORT_BRANCHES="$(echo "$LOCAL_BRANCHES" | grep "^$PREFIX")"
if [ -z "$SUPPORT_BRANCHES" ]; then
if [ -z "$SUPPORT_BRANCHES" ]; then
warn "No support branches exist."
warn "No support branches exist."
...
...
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