Description: Debian-specific patches mixed together.
 This patch contains all the Debian-added changes mixed together. To
 review them separately, please inspect the Git repository, and the
 branches therein.
Origin: Debian

--- git-flow-0.4.1.orig/git-flow-feature
+++ git-flow-0.4.1/git-flow-feature
@@ -39,7 +39,7 @@
 require_git_repo
 require_gitflow_initialized
 gitflow_load_settings
-PREFIX=$(git config --get gitflow.prefix.feature)
+PREFIX=$(git config --get $(gitflow_config).prefix.feature)
 
 usage() {
 	echo "usage: git flow feature [list] [-v]"
--- git-flow-0.4.1.orig/gitflow-common
+++ git-flow-0.4.1/gitflow-common
@@ -152,39 +152,47 @@ git_is_branch_merged_into() {
 # gitflow specific common functionality
 #
 
+# assembles the configuration prefix
+# when called as git-flow, use gitflow, if called as git-flow-$something, use gitflow-$something.
+gitflow_config() {
+	local self=${GIT_FLOW_SELF:-$(basename $0)}
+	self="gitflow${self#git-flow}"
+	echo ${self}
+}
+
 # check if this repo has been inited for gitflow
 gitflow_has_master_configured() {
-	local master=$(git config --get gitflow.branch.master)
+	local master=$(git config --get $(gitflow_config).branch.master)
 	[ "$master" != "" ] && git_local_branch_exists "$master"
 }
 
 gitflow_has_develop_configured() {
-	local develop=$(git config --get gitflow.branch.develop)
+	local develop=$(git config --get $(gitflow_config).branch.develop)
 	[ "$develop" != "" ] && git_local_branch_exists "$develop"
 }
 
 gitflow_has_prefixes_configured() {
-	git config --get gitflow.prefix.feature >/dev/null 2>&1     && \
-	git config --get gitflow.prefix.release >/dev/null 2>&1     && \
-	git config --get gitflow.prefix.hotfix >/dev/null 2>&1      && \
-	git config --get gitflow.prefix.support >/dev/null 2>&1     && \
-	git config --get gitflow.prefix.versiontag >/dev/null 2>&1
+	git config --get $(gitflow_config).prefix.feature >/dev/null 2>&1     && \
+	git config --get $(gitflow_config).prefix.release >/dev/null 2>&1     && \
+	git config --get $(gitflow_config).prefix.hotfix >/dev/null 2>&1      && \
+	git config --get $(gitflow_config).prefix.support >/dev/null 2>&1     && \
+	git config --get $(gitflow_config).prefix.versiontag >/dev/null 2>&1
 }
 
 gitflow_is_initialized() {
 	gitflow_has_master_configured                    && \
 	gitflow_has_develop_configured                   && \
-	[ "$(git config --get gitflow.branch.master)" !=    \
-	  "$(git config --get gitflow.branch.develop)" ] && \
+	[ "$(git config --get $(gitflow_config).branch.master)" !=    \
+	  "$(git config --get $(gitflow_config).branch.develop)" ] && \
 	gitflow_has_prefixes_configured
 }
 
 # loading settings that can be overridden using git config
 gitflow_load_settings() {
 	export DOT_GIT_DIR=$(git rev-parse --git-dir >/dev/null 2>&1)
-	export MASTER_BRANCH=$(git config --get gitflow.branch.master)
-	export DEVELOP_BRANCH=$(git config --get gitflow.branch.develop)
-	export ORIGIN=$(git config --get gitflow.origin || echo origin)
+	export MASTER_BRANCH=$(git config --get $(gitflow_config).branch.master)
+	export DEVELOP_BRANCH=$(git config --get $(gitflow_config).branch.develop)
+	export ORIGIN=$(git config --get $(gitflow_config).origin || echo origin)
 }
 
 #
--- git-flow-0.4.1.orig/git-flow-release
+++ git-flow-0.4.1/git-flow-release
@@ -39,8 +39,8 @@
 require_git_repo
 require_gitflow_initialized
 gitflow_load_settings
-VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
-PREFIX=$(git config --get gitflow.prefix.release)
+VERSION_PREFIX=$(eval "echo `git config --get $(gitflow_config).prefix.versiontag`")
+PREFIX=$(git config --get $(gitflow_config).prefix.release)
 
 usage() {
 	echo "usage: git flow release [list] [-v]"
--- git-flow-0.4.1.orig/git-flow-init
+++ git-flow-0.4.1/git-flow-init
@@ -76,7 +76,7 @@ cmd_default() {
 	# add a master branch if no such branch exists yet
 	local master_branch
 	if gitflow_has_master_configured && ! flag force; then
-		master_branch=$(git config --get gitflow.branch.master)
+		master_branch=$(git config --get $(gitflow_config).branch.master)
 	else
 		# Two cases are distinguished:
 		# 1. A fresh git repo (without any branches)
@@ -90,7 +90,7 @@ cmd_default() {
 		if [ "$branch_count" -eq 0 ]; then
 			echo "No branches exist yet. Base branches must be created now."
 			should_check_existence=NO
-			default_suggestion=$(git config --get gitflow.branch.master || echo master)
+			default_suggestion=$(git config --get $(gitflow_config).branch.master || echo master)
 		else
 			echo
 			echo "Which branch should be used for bringing forth production releases?"
@@ -98,7 +98,7 @@ cmd_default() {
 
 			should_check_existence=YES
 			default_suggestion=
-			for guess in $(git config --get gitflow.branch.master) \
+			for guess in $(git config --get $(gitflow_config).branch.master) \
 			             'production' 'main' 'master'; do
 				if git_local_branch_exists "$guess"; then
 					default_suggestion="$guess"
@@ -122,13 +122,13 @@ cmd_default() {
 		fi
 
 		# store the name of the master branch
-		git config gitflow.branch.master "$master_branch"
+		git config $(gitflow_config).branch.master "$master_branch"
 	fi
 
 	# add a develop branch if no such branch exists yet
 	local develop_branch
 	if gitflow_has_develop_configured && ! flag force; then
-		develop_branch=$(git config --get gitflow.branch.develop)
+		develop_branch=$(git config --get $(gitflow_config).branch.develop)
 	else
 		# Again, the same two cases as with the master selection are
 		# considered (fresh repo or repo that contains branches)
@@ -137,7 +137,7 @@ cmd_default() {
 		branch_count=$(git_local_branches | grep -v "^${master_branch}\$" | wc -l)
 		if [ "$branch_count" -eq 0 ]; then
 			should_check_existence=NO
-			default_suggestion=$(git config --get gitflow.branch.develop || echo develop)
+			default_suggestion=$(git config --get $(gitflow_config).branch.develop || echo develop)
 		else
 			echo
 			echo "Which branch should be used for integration of the \"next release\"?"
@@ -145,7 +145,7 @@ cmd_default() {
 
 			should_check_existence=YES
 			default_suggestion=
-			for guess in $(git config --get gitflow.branch.develop) \
+			for guess in $(git config --get $(gitflow_config).branch.develop) \
 			             'develop' 'int' 'integration' 'master'; do
 				if git_local_branch_exists "$guess"; then
 					default_suggestion="$guess"
@@ -173,7 +173,7 @@ cmd_default() {
 		fi
 
 		# store the name of the develop branch
-		git config gitflow.branch.develop "$develop_branch"
+		git config $(gitflow_config).branch.develop "$develop_branch"
 	fi
 
 	# Creation of HEAD
@@ -214,11 +214,11 @@ cmd_default() {
 
 	# finally, ask the user for naming conventions (branch and tag prefixes)
 	if flag force || \
-	   ! git config --get gitflow.prefix.feature >/dev/null 2>&1 || 
-	   ! git config --get gitflow.prefix.release >/dev/null 2>&1 || 
-	   ! git config --get gitflow.prefix.hotfix >/dev/null 2>&1 || 
-	   ! git config --get gitflow.prefix.support >/dev/null 2>&1 || 
-	   ! git config --get gitflow.prefix.versiontag >/dev/null 2>&1; then
+	   ! git config --get $(gitflow_config).prefix.feature >/dev/null 2>&1 || 
+	   ! git config --get $(gitflow_config).prefix.release >/dev/null 2>&1 || 
+	   ! git config --get $(gitflow_config).prefix.hotfix >/dev/null 2>&1 || 
+	   ! git config --get $(gitflow_config).prefix.support >/dev/null 2>&1 || 
+	   ! git config --get $(gitflow_config).prefix.versiontag >/dev/null 2>&1; then
 		echo
 		echo "How to name your supporting branch prefixes?"
 	fi
@@ -226,8 +226,8 @@ cmd_default() {
 	local prefix
 
 	# Feature branches
-	if ! git config --get gitflow.prefix.feature >/dev/null 2>&1 || flag force; then
-		default_suggestion=$(git config --get gitflow.prefix.feature || echo feature/)
+	if ! git config --get $(gitflow_config).prefix.feature >/dev/null 2>&1 || flag force; then
+		default_suggestion=$(git config --get $(gitflow_config).prefix.feature || echo feature/)
 		printf "Feature branches? [$default_suggestion] "
 		if noflag defaults; then
 			read answer
@@ -235,12 +235,12 @@ cmd_default() {
 			printf "\n"
 		fi
 		[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
-		git config gitflow.prefix.feature "$prefix"
+		git config $(gitflow_config).prefix.feature "$prefix"
 	fi
 
 	# Release branches
-	if ! git config --get gitflow.prefix.release >/dev/null 2>&1 || flag force; then
-		default_suggestion=$(git config --get gitflow.prefix.release || echo release/)
+	if ! git config --get $(gitflow_config).prefix.release >/dev/null 2>&1 || flag force; then
+		default_suggestion=$(git config --get $(gitflow_config).prefix.release || echo release/)
 		printf "Release branches? [$default_suggestion] "
 		if noflag defaults; then
 			read answer
@@ -248,13 +248,13 @@ cmd_default() {
 			printf "\n"
 		fi
 		[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
-		git config gitflow.prefix.release "$prefix"
+		git config $(gitflow_config).prefix.release "$prefix"
 	fi
 
 
 	# Hotfix branches
-	if ! git config --get gitflow.prefix.hotfix >/dev/null 2>&1 || flag force; then
-		default_suggestion=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
+	if ! git config --get $(gitflow_config).prefix.hotfix >/dev/null 2>&1 || flag force; then
+		default_suggestion=$(git config --get $(gitflow_config).prefix.hotfix || echo hotfix/)
 		printf "Hotfix branches? [$default_suggestion] "
 		if noflag defaults; then
 			read answer
@@ -262,13 +262,13 @@ cmd_default() {
 			printf "\n"
 		fi
 		[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
-		git config gitflow.prefix.hotfix "$prefix"
+		git config $(gitflow_config).prefix.hotfix "$prefix"
 	fi
 
 
 	# Support branches
-	if ! git config --get gitflow.prefix.support >/dev/null 2>&1 || flag force; then
-		default_suggestion=$(git config --get gitflow.prefix.support || echo support/)
+	if ! git config --get $(gitflow_config).prefix.support >/dev/null 2>&1 || flag force; then
+		default_suggestion=$(git config --get $(gitflow_config).prefix.support || echo support/)
 		printf "Support branches? [$default_suggestion] "
 		if noflag defaults; then
 			read answer
@@ -276,13 +276,13 @@ cmd_default() {
 			printf "\n"
 		fi
 		[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
-		git config gitflow.prefix.support "$prefix"
+		git config $(gitflow_config).prefix.support "$prefix"
 	fi
 
 
 	# Version tag prefix
-	if ! git config --get gitflow.prefix.versiontag >/dev/null 2>&1 || flag force; then
-		default_suggestion=$(git config --get gitflow.prefix.versiontag || echo "")
+	if ! git config --get $(gitflow_config).prefix.versiontag >/dev/null 2>&1 || flag force; then
+		default_suggestion=$(git config --get $(gitflow_config).prefix.versiontag || echo "")
 		printf "Version tag prefix? [$default_suggestion] "
 		if noflag defaults; then
 			read answer
@@ -290,7 +290,7 @@ cmd_default() {
 			printf "\n"
 		fi
 		[ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion}
-		git config gitflow.prefix.versiontag "$prefix"
+		git config $(gitflow_config).prefix.versiontag "$prefix"
 	fi
 
 
--- git-flow-0.4.1.orig/git-flow-support
+++ git-flow-0.4.1/git-flow-support
@@ -39,8 +39,8 @@
 require_git_repo
 require_gitflow_initialized
 gitflow_load_settings
-VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
-PREFIX=$(git config --get gitflow.prefix.support)
+VERSION_PREFIX=$(eval "echo `git config --get $(gitflow_config).prefix.versiontag`")
+PREFIX=$(git config --get $(gitflow_config).prefix.support)
 
 warn "note: The support subcommand is still very EXPERIMENTAL!"
 warn "note: DO NOT use it in a production situation."
--- git-flow-0.4.1.orig/git-flow-hotfix
+++ git-flow-0.4.1/git-flow-hotfix
@@ -39,8 +39,8 @@
 require_git_repo
 require_gitflow_initialized
 gitflow_load_settings
-VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
-PREFIX=$(git config --get gitflow.prefix.hotfix)
+VERSION_PREFIX=$(eval "echo `git config --get $(gitflow_config).prefix.versiontag`")
+PREFIX=$(git config --get $(gitflow_config).prefix.hotfix)
 
 usage() {
 	echo "usage: git flow hotfix [list] [-v]"
