Bugfix to avoid errors due to Git subcommands returning ANSI color output.
diff --git a/git-flow-support b/git-flow-support
index ba92cb9..e95dfcb 100644
--- a/git-flow-support
+++ b/git-flow-support
@@ -71,7 +71,7 @@
warn ""
exit 0
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")
# determine column width first
@@ -148,7 +148,7 @@
}
require_base_is_on_master() {
- if ! git branch --contains "$BASE" 2>/dev/null \
+ if ! git branch --color=never --contains "$BASE" 2>/dev/null \
| sed 's/[* ] //g' \
| grep -q "^$MASTER_BRANCH\$"; then
die "fatal: Given base '$BASE' is not a valid commit on '$MASTER_BRANCH'."