+if head_=$(git symbolic-ref -q HEAD); then
+ case "$head_" in
+ refs/heads/*)
+ git rev-parse -q --verify "refs/top-bases${head_#refs/heads}" >/dev/null || exit 0;;
+ *)
+ exit 0;;
+ esac
+
+else
+ exit 0;
+fi
+
+# TODO: check the index, not the working copy