Check whether this is a freshly git init'ed repo that's still HEADless. In
that case, don't check if the working tree is clean (this yields errors in
HEADless repos).

This fix enabled users to use "git init && git flow init", too.
diff --git a/git-flow-init b/git-flow-init
index 45c7171..364420a 100644
--- a/git-flow-init
+++ b/git-flow-init
@@ -30,12 +30,8 @@
 	if ! git rev-parse --git-dir >/dev/null 2>&1; then
 		git init
 	else
-		# TODO: This still fails when running:
-		# git init
-		# git flow init
-
 		# assure that we are not working in a repo with local changes
-		gitflow_require_clean_working_tree
+		git_repo_is_headless || gitflow_require_clean_working_tree
 	fi
 
 	# running git flow init on an already initialized repo is fine
diff --git a/gitflow-common b/gitflow-common
index 70b137b..9702818 100644
--- a/gitflow-common
+++ b/gitflow-common
@@ -154,6 +154,10 @@
 	fi
 }
 
+git_repo_is_headless() {
+	! git rev-parse --quiet --verify HEAD >/dev/null 2>&1
+}
+
 gitflow_require_clean_working_tree() {
 	gitflow_test_clean_working_tree
 	local result=$?