Using the "repo" (written in python) tool from AOSP, when you use its "sync" command, according to other answers I've read here such as (How does the Android repo manifest repository work?) it will checkout the branch specified in the manifest for that git repo.
But that does not match with what I actually see when going into one of the git local repos, where I get:
aosp@aosp:/aosp/android-x86-jb42/bionic$ git branch
* (no branch)
and .git/HEAD contains a SHA instead of a ref to the branch ref path. So to me it looks more like being on a detached head but again if I manually do that (checkout a specific commit) the result of git branch will display the sha1 in the output, not just "(no branch)" as above.
Whats going on here?