What happens behind the scenes when I do a repo sync in my Android repository?

Is it equivalent to repo forall -c "git pull" or maybe git fetch? Or does it do something more complex?

Thanks

Edit
Report