Cloud directory-sync's initial-checkout logic now distinguishes detached from attached sessions and checks the reflog
The logic that determines the starting state of a git checkout when syncing a sandbox or cloud checkout now explicitly tracks whether the branch is detached (has no branch name), and records this along with an origin value in its telemetry. It also now checks for matching refs under both the existing turns-ref prefix and a new second ref prefix, and checks whether a HEAD reflog exists, before deciding whether a checkout should be treated as 'unborn' (no commits yet) or 'committed'.
This makes the sync system's judgment about a fresh checkout's state more accurate, covering detached-branch sessions and an additional ref location that weren't distinguished before.