detect relocated .git dirs, show commit hash instead of [DETACHED HEAD]