3

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?

Community
  • 1
  • 1
Maks
  • 7,562
  • 6
  • 43
  • 65

1 Answers1

5

repo sync is equivalent to below git commands :

 git remote update
 git rebase origin/branch

If you want to check what commands it runs internally then use --trace with repo command. e.g.

repo --trace sync 
mrutyunjay
  • 6,850
  • 7
  • 25
  • 35