Added an optional <base> argument to all start subactions.

The only exception to the rule is git-flow-support, which has an
explicitly required <base> argument (since we cannot deduce a sane default
name for base).

Furthermore, these <base> arguments are checked to refer to commits on:
- develop (for feature, release)
- master  (for hotfix, support)

Removed any occurrences of optional <base> arguments in finish subactions.
The finishing target branches are clearly defined by the model. The <base>
argument will probably confuse users. If they want the power to merge
those feature branches into *other* branches then develop, for example,
they can still use the magical power of Git itself for that. Gitflow
should not provide such support.
diff --git a/README.mdown b/README.mdown
index 2af8083..f76df03 100644
--- a/README.mdown
+++ b/README.mdown
@@ -58,22 +58,28 @@
   		git flow feature start <name> [<base>]
   		git flow feature finish <name>
   
-  (`base` is `develop` by default)
+  For feature branches, the `<base>` arg must be a commit on `develop`.
 
 * To list/start/finish release branches, use:
   
   		git flow release
-  		git flow release start <release>
+  		git flow release start <release> [<base>]
   		git flow release finish <release>
   
+  For release branches, the `<base>` arg must be a commit on `develop`.
+  
 * To list/start/finish hotfix branches, use:
   
   		git flow hotfix
-  		git flow hotfix start <release> [<base-release>]
+  		git flow hotfix start <release> [<base>]
   		git flow hotfix finish <release>
+  
+  For hotfix branches, the `<base>` arg must be a commit on `master`.
 
 * To list/start support branches, use:
   
   		git flow support
-  		git flow support start <release> [<base-release>]
+  		git flow support start <release> <base>
+  
+  For support branches, the `<base>` arg must be a commit on `master`.
 
diff --git a/git-flow-feature b/git-flow-feature
index 6cb635a..4cb5c52 100644
--- a/git-flow-feature
+++ b/git-flow-feature
@@ -17,7 +17,7 @@
 usage() {
 	echo "usage: git flow feature [list] [-v]"
 	echo "       git flow feature start [-Fv] <name> [<base>]"
-	echo "       git flow feature finish [-rsFv] <name|nameprefix> [<base>]"
+	echo "       git flow feature finish [-rsFv] <name|nameprefix>"
 	echo "       git flow feature publish <name>"
 	echo "       git flow feature track <name>"
 	echo "       git flow feature diff <name|nameprefix>"
@@ -148,7 +148,6 @@
 
 	# read arguments into global variables
 	NAME="$1"
-	BASE="${2:-$DEVELOP_BRANCH}"
 	BRANCH=$PREFIX$NAME
 }
 
@@ -156,6 +155,7 @@
 	DEFINE_boolean fetch false 'fetch from origin before performing local operation' F
 	DEFINE_boolean force false 'force creation of feature branch (ignores dirty working tree)' f
 	parse_args "$@"
+	BASE="${2:-$DEVELOP_BRANCH}"
 	require_name
 
 	# sanity checks
@@ -248,24 +248,22 @@
 	if has $ORIGIN/$BRANCH $REMOTE_BRANCHES; then
 		gitflow_require_branches_equal $BRANCH $ORIGIN/$BRANCH
 	fi
-	if [ "$BASE" = "$DEVELOP_BRANCH" ]; then
-		gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
-	fi
+	gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
 
 	# if the user wants to rebase, do that first
 	if flag rebase; then
-		if ! git flow feature rebase "$NAME" "$BASE"; then
+		if ! git flow feature rebase "$NAME" "$DEVELOP_BRANCH"; then
 			warn "Finish was aborted due to conflicts during rebase."
 			warn "Please finish the rebase manually now."
 			warn "When finished, re-run:"
-			warn "    git flow feature finish '$NAME' '$BASE'"
+			warn "    git flow feature finish '$NAME' '$DEVELOP_BRANCH'"
 			exit 1
 		fi
 	fi
 
 	# merge into BASE
-	git checkout $BASE
-	if [ "$(git rev-list -n2 $BASE..$BRANCH | wc -l)" -eq 1 ]; then
+	git checkout $DEVELOP_BRANCH
+	if [ "$(git rev-list -n2 $DEVELOP_BRANCH..$BRANCH | wc -l)" -eq 1 ]; then
 		git merge --ff $BRANCH
 	else
 		git merge --no-ff $BRANCH
@@ -273,9 +271,9 @@
 
 	if [ $? -ne 0 ]; then
 		# oops.. we have a merge conflict!
-		# write the given $BASE to a temporary file (we need it later)
+		# write the given $DEVELOP_BRANCH to a temporary file (we need it later)
 		mkdir -p "$GIT_DIR/.gitflow"
-		echo "$BASE" > "$GIT_DIR/.gitflow/MERGE_BASE"
+		echo "$DEVELOP_BRANCH" > "$GIT_DIR/.gitflow/MERGE_BASE"
 		echo
 		echo "There were merge conflicts. To resolve the merge conflict manually, use:"
 		echo "    git mergetool"
@@ -304,10 +302,10 @@
 
 	echo
 	echo "Summary of actions:"
-	echo "- The feature branch '$BRANCH' was merged into '$BASE'"
+	echo "- The feature branch '$BRANCH' was merged into '$DEVELOP_BRANCH'"
 	#echo "- Merge conflicts were resolved"		# TODO: Add this line when it's supported
 	echo "- Feature branch '$BRANCH' has been removed"
-	echo "- You are now on branch '$BASE'"
+	echo "- You are now on branch '$DEVELOP_BRANCH'"
 	echo
 }
 
@@ -380,5 +378,5 @@
 	if flag interactive; then
 		OPTS="$OPTS -i"
 	fi
-	git rebase $OPTS "$BASE"
+	git rebase $OPTS "$DEVELOP_BRANCH"
 }
diff --git a/git-flow-hotfix b/git-flow-hotfix
index d3c70ad..efc69a7 100644
--- a/git-flow-hotfix
+++ b/git-flow-hotfix
@@ -19,17 +19,7 @@
 usage() {
 	echo "usage: git flow hotfix [list] [-v]"
 	echo "       git flow hotfix start <version> [<base>]"
-	echo "       git flow hotfix finish <version> [<base>]"
-	# TODO
-	#echo ""
-	#echo "options:"
-	#echo "--option    Explanation"
-	#echo ""
-	#echo "start-only options:"
-	#echo "--option    Explanation"
-	#echo ""
-	#echo "finish-only options:"
-	#echo "--push      Push to the origin repo when finished"
+	echo "       git flow hotfix finish <version>"
 }
 
 cmd_default() {
@@ -98,7 +88,6 @@
 
 	# read arguments into global variables
 	VERSION="$1"
-	BASE="${2:-$MASTER_BRANCH}"
 	BRANCH=$PREFIX$VERSION
 }
 
@@ -110,8 +99,19 @@
 	fi
 }
 
+require_base_is_on_master() {
+	if ! git branch --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'."
+	fi
+}
+
 cmd_start() {
 	parse_args "$@"
+	BASE="${2:-$MASTER_BRANCH}"
+	require_version_arg
+	require_base_is_on_master
 
 	# sanity checks
 	gitflow_require_clean_working_tree
@@ -134,12 +134,13 @@
 	echo "- Start committing your hot fixes"
 	echo "- When done, run:"
 	echo
-	echo "     git flow finish hotfix '$HOTFIX_BRANCH'"
+	echo "     git flow hotfix finish '$VERSION'"
 	echo
 }
 
 cmd_finish() {
 	parse_args "$@"
+	require_version_arg
 
 	# sanity checks
 	gitflow_require_clean_working_tree
@@ -150,17 +151,14 @@
 	gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
 	gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
 
-	# merge into BASE
-	git checkout $BASE
+	# merge into master
+	git checkout $MASTER_BRANCH
 	git merge --no-ff $BRANCH
 	git tag $VERSION_PREFIX$VERSION
 
 	# merge into develop if we fixed a master issue
-	# TODO: merge into support branch
-	if [ "$BASE" = "$MASTER_BRANCH" ]; then
-		git checkout $DEVELOP_BRANCH
-		git merge --no-ff $BRANCH
-	fi
+	git checkout $DEVELOP_BRANCH
+	git merge --no-ff $BRANCH
 
 	# delete branch
 	git branch -d $BRANCH
@@ -171,11 +169,9 @@
 	echo
 	echo "Summary of actions:"
 	echo "- Latest objects have been fetched from '$ORIGIN'"
-	echo "- Hotfix branch has been merged into '$BASE'"
+	echo "- Hotfix branch has been merged into '$MASTER_BRANCH'"
 	echo "- The hotfix was tagged '$VERSION_PREFIX$VERSION'"
-	if [ "$BASE" = "$MASTER_BRANCH" ]; then
-		echo "- Hotfix branch has been back-merged into '$DEVELOP_BRANCH'"
-	fi
+	echo "- Hotfix branch has been back-merged into '$DEVELOP_BRANCH'"
 	echo "- Hotfix branch '$BRANCH' has been deleted"
 	echo
 }
diff --git a/git-flow-release b/git-flow-release
index 8cdeadb..b75891e 100644
--- a/git-flow-release
+++ b/git-flow-release
@@ -105,9 +105,19 @@
 	fi
 }
 
+require_base_is_on_develop() {
+	if ! git branch --contains "$BASE" 2>/dev/null \
+			| sed 's/[* ] //g' \
+	  		| grep -q "^$DEVELOP_BRANCH\$"; then
+		die "fatal: Given base '$BASE' is not a valid commit on '$DEVELOP_BRANCH'."
+	fi
+}
+
 cmd_start() {
 	parse_args "$@"
+	BASE="${2:-$DEVELOP_BRANCH}"
 	require_version_arg
+	require_base_is_on_develop
 
 	# sanity checks
 	gitflow_require_clean_working_tree
@@ -118,11 +128,11 @@
 	gitflow_require_branch_absent $BRANCH
 
 	# create branch
-	git checkout -b $BRANCH $DEVELOP_BRANCH
+	git checkout -b $BRANCH $BASE
 
 	echo
 	echo "Summary of actions:"
-	echo "- A new branch '$BRANCH' was created, based on '$DEVELOP_BRANCH'"
+	echo "- A new branch '$BRANCH' was created, based on '$BASE'"
 	echo "- You are now on branch '$BRANCH'"
 	echo
 	echo "Follow-up actions:"
@@ -130,7 +140,7 @@
 	echo "- Start committing last-minute fixes in preparing your release"
 	echo "- When done, run:"
 	echo
-	echo "     git flow finish release '$VERSION'"
+	echo "     git flow release finish '$VERSION'"
 	echo
 }
 
diff --git a/git-flow-support b/git-flow-support
index 11d5a11..e334592 100644
--- a/git-flow-support
+++ b/git-flow-support
@@ -21,7 +21,7 @@
 
 usage() {
 	echo "usage: git flow support [list] [-v]"
-	echo "       git flow support start <version> [<base>]"
+	echo "       git flow support start <version> <base>"
 }
 
 cmd_default() {
@@ -90,7 +90,7 @@
 
 	# read arguments into global variables
 	VERSION="$1"
-	BASE="${2:-${VERSION_PREFIX}${VERSION}}"
+	BASE="$2"
 	BRANCH=$PREFIX$VERSION
 }
 
@@ -102,9 +102,27 @@
 	fi
 }
 
+require_base_arg() {
+	if [ "$BASE" = "" ]; then
+		warn "Missing argument <base>"
+		usage
+		exit 1
+	fi
+}
+
+require_base_is_on_master() {
+	if ! git branch --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'."
+	fi
+}
+
 cmd_start() {
 	parse_args "$@"
 	require_version_arg
+	require_base_arg
+	require_base_is_on_master
 
 	# sanity checks
 	gitflow_require_clean_working_tree
@@ -113,21 +131,14 @@
 	if [ $FLAG_FETCH -eq 1 ]; then
 		git fetch -q $ORIGIN $BASE
 	fi
+	gitflow_require_branch_absent $BRANCH
 
 	# create branch
 	git checkout -b "$BRANCH" "$BASE"
 
-	# publish branch
-	#git push $ORIGIN $BRANCH:refs/heads/$BRANCH
-
-	git config branch.$BRANCH.remote $ORIGIN
-	git config branch.$BRANCH.merge refs/heads/$BRANCH
-	git checkout $BRANCH
-
 	echo
 	echo "Summary of actions:"
-	echo "- A new remote branch '$BRANCH' was created, based on '$BASE'"
-	echo "- A new tracking branch '$BRANCH' was created"
+	echo "- A new branch '$BRANCH' was created, based on '$BASE'"
 	echo "- You are now on branch '$BRANCH'"
 	echo
 }