Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean 'upstream' in the manifest file, repo?

I found the 'upstream' attribute in manifest file, repo. I'm not sure what it means during 'repo sync' and 'repo sync -c' And what's the difference between projectA and projectB below example.

During 'repo sync', I think it will clone projectA with commit '12345', In projectB case, it will also clone projectB with commit 'abcde'. Why 'upstream' is needed?

Please could you explain what it means?

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
    <project name="projectA" path="project/A" remote="aosp" revision="12345" upstream="projectA/develop"/>
    <project name="projectB" path="project/B" remote="aosp" revision="abcde" />
</manifest>
like image 414
hyde1004 Avatar asked Oct 28 '25 16:10

hyde1004


1 Answers

Attribute upstream as defined in repo Manifest Format

Attribute upstream: Name of the Git ref in which a sha1 can be found. Used when syncing a revision locked manifest in -c mode to avoid having to sync the entire ref space.

From this I understand that the sha mentioned in revision="12345" can be found in branch develop

I am guessing that there is some default entry at the top of manifest which will help the second line in your snippet.

like image 173
sob Avatar answered Oct 31 '25 07:10

sob