In the repo sync documentation it is stated that:
If the project has been synchronized before, then repo sync is equivalent to:
git remote update
git rebase origin/branch
where branch is the currently checked-out branch in the local project directory. If the local branch isn't tracking a branch in the remote repository, then no synchronization occurs for the project.
This means that after I successfully repo init && repo sync once, then I can use
$ repo forall -c git update
$ repo forall -c git checkout -b $REPO_RREV $REPO_REMOTE/$REPO_RREV
$ repo forall -c git pull $REPO_REMOTE $REPO_RREV
in order to achieve the same outcome as repo sync.
I'm concerned about the following:
- If
repois a tool that manages multiple git repositories with the help of a manifest.xml file, what happens if the manifest changes in the remote repository(upstream)? - If e.g. a new repository is added to the manifest.xml file, how is
repo syncequivalent togit remote update && git rebase origin/branch? - Isn't
repo syncalso updating the manifest.xml file and then pulling the newly added repository? Because if this is the case, thenrepo syncis clearly not equivalent torepo forall -c git remote update && repo forall -c git rebase origin/branch.
Is repo sync equivalent to git remote update && git rebase origin/branch or the documentation is missing something? Can someone please clarify how repo sync really works under the hood from this point of view?