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/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=$?