Revert "detached heads ok fine"

This reverts commit f2165f1483bea2513013c9e5d617d5601147ee39.