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
871f5ede
Commit
871f5ede
authored
Aug 21, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix to avoid errors due to Git subcommands returning ANSI color output.
parent
ac949bfb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
git-flow-feature
git-flow-feature
+1
-1
git-flow-hotfix
git-flow-hotfix
+2
-2
git-flow-release
git-flow-release
+2
-2
git-flow-support
git-flow-support
+2
-2
gitflow-common
gitflow-common
+5
-5
No files found.
git-flow-feature
View file @
871f5ede
...
@@ -74,7 +74,7 @@ cmd_list() {
...
@@ -74,7 +74,7 @@ cmd_list() {
warn ""
warn ""
exit 0
exit 0
fi
fi
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
current_branch=$(git branch
--color=never
| grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
short_names=$(echo "$feature_branches" | sed "s ^$PREFIX g")
short_names=$(echo "$feature_branches" | sed "s ^$PREFIX g")
# determine column width first
# determine column width first
...
...
git-flow-hotfix
View file @
871f5ede
...
@@ -69,7 +69,7 @@ cmd_list() {
...
@@ -69,7 +69,7 @@ cmd_list() {
warn ""
warn ""
exit 0
exit 0
fi
fi
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
current_branch=$(git branch
--color=never
| grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
short_names=$(echo "$hotfix_branches" | sed "s ^$PREFIX g")
short_names=$(echo "$hotfix_branches" | sed "s ^$PREFIX g")
# determine column width first
# determine column width first
...
@@ -137,7 +137,7 @@ require_version_arg() {
...
@@ -137,7 +137,7 @@ require_version_arg() {
}
}
require_base_is_on_master() {
require_base_is_on_master() {
if ! git branch --contains "$BASE" 2>/dev/null \
if ! git branch --co
lor=never --co
ntains "$BASE" 2>/dev/null \
| sed 's/[* ] //g' \
| sed 's/[* ] //g' \
| grep -q "^$MASTER_BRANCH\$"; then
| grep -q "^$MASTER_BRANCH\$"; then
die "fatal: Given base '$BASE' is not a valid commit on '$MASTER_BRANCH'."
die "fatal: Given base '$BASE' is not a valid commit on '$MASTER_BRANCH'."
...
...
git-flow-release
View file @
871f5ede
...
@@ -70,7 +70,7 @@ cmd_list() {
...
@@ -70,7 +70,7 @@ cmd_list() {
exit 0
exit 0
fi
fi
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
current_branch=$(git branch
--color=never
| grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
short_names=$(echo "$release_branches" | sed "s ^$PREFIX g")
short_names=$(echo "$release_branches" | sed "s ^$PREFIX g")
# determine column width first
# determine column width first
...
@@ -132,7 +132,7 @@ require_version_arg() {
...
@@ -132,7 +132,7 @@ require_version_arg() {
}
}
require_base_is_on_develop() {
require_base_is_on_develop() {
if ! git branch --contains "$BASE" 2>/dev/null \
if ! git branch --co
lor=never --co
ntains "$BASE" 2>/dev/null \
| sed 's/[* ] //g' \
| sed 's/[* ] //g' \
| grep -q "^$DEVELOP_BRANCH\$"; then
| grep -q "^$DEVELOP_BRANCH\$"; then
die "fatal: Given base '$BASE' is not a valid commit on '$DEVELOP_BRANCH'."
die "fatal: Given base '$BASE' is not a valid commit on '$DEVELOP_BRANCH'."
...
...
git-flow-support
View file @
871f5ede
...
@@ -71,7 +71,7 @@ cmd_list() {
...
@@ -71,7 +71,7 @@ cmd_list() {
warn ""
warn ""
exit 0
exit 0
fi
fi
current_branch=$(git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
current_branch=$(git branch
--color=never
| grep '^\* ' | grep -v 'no branch' | sed 's/^* //g')
short_names=$(echo "$support_branches" | sed "s ^$PREFIX g")
short_names=$(echo "$support_branches" | sed "s ^$PREFIX g")
# determine column width first
# determine column width first
...
@@ -148,7 +148,7 @@ require_base_arg() {
...
@@ -148,7 +148,7 @@ require_base_arg() {
}
}
require_base_is_on_master() {
require_base_is_on_master() {
if ! git branch --contains "$BASE" 2>/dev/null \
if ! git branch --co
lor=never --co
ntains "$BASE" 2>/dev/null \
| sed 's/[* ] //g' \
| sed 's/[* ] //g' \
| grep -q "^$MASTER_BRANCH\$"; then
| grep -q "^$MASTER_BRANCH\$"; then
die "fatal: Given base '$BASE' is not a valid commit on '$MASTER_BRANCH'."
die "fatal: Given base '$BASE' is not a valid commit on '$MASTER_BRANCH'."
...
...
gitflow-common
View file @
871f5ede
...
@@ -66,13 +66,13 @@ noflag() { local FLAG; eval FLAG='$FLAGS_'$1; [ $FLAG -ne $FLAGS_TRUE ]; }
...
@@ -66,13 +66,13 @@ noflag() { local FLAG; eval FLAG='$FLAGS_'$1; [ $FLAG -ne $FLAGS_TRUE ]; }
# Git specific common functionality
# Git specific common functionality
#
#
git_local_branches() { git branch | sed 's/^[* ] //'; }
git_local_branches() { git branch
--color=never
| sed 's/^[* ] //'; }
git_remote_branches() { git branch -r | sed 's/^[* ] //'; }
git_remote_branches() { git branch -r
--color=never
| sed 's/^[* ] //'; }
git_all_branches() { ( git branch
; git branch -
r) | sed 's/^[* ] //'; }
git_all_branches() { ( git branch
--color=never; git branch -r --color=neve
r) | sed 's/^[* ] //'; }
git_all_tags() { git tag; }
git_all_tags() { git tag; }
git_current_branch() {
git_current_branch() {
git branch | grep '^\* ' | grep -v 'no branch' | sed 's/^* //g'
git branch
--color=never
| grep '^\* ' | grep -v 'no branch' | sed 's/^* //g'
}
}
git_is_clean_working_tree() {
git_is_clean_working_tree() {
...
@@ -140,7 +140,7 @@ git_compare_branches() {
...
@@ -140,7 +140,7 @@ git_compare_branches() {
git_is_branch_merged_into() {
git_is_branch_merged_into() {
local subject=$1
local subject=$1
local base=$2
local base=$2
local all_merges=$(git branch --contains $subject | sed 's/^[* ] //')
local all_merges=$(git branch --co
lor=never --co
ntains $subject | sed 's/^[* ] //')
has $base $all_merges
has $base $all_merges
}
}
...
...
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