I am using git repo tool and I am using this bash script to create the manifest file:
repo manifest -r -o default.xml
The output in the created default.xml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="REMOTE_NAME" fetch="https://github.com/ORGANIZATION_NAME"/>
<project name="PNG_MCU" remote="REMOTE_NAME" revision="f7815add324ea221e9e8e2cc1e13e350e9d5b461" upstream="main" dest-branch="main"/>
<project name="PNG_Middlewares" remote="REMOTE_NAME" revision="9a2d3faa78730684295c31d193e00225fa29fe42" upstream="main" dest-branch="main"/>
<project name="PNG_APPLICATION" remote="REMOTE_NAME" revision="b237708997e0127914d7a4364e51169540f780e5" upstream="main" dest-branch="main"/>
<project name="PNG_HAL" remote="REMOTE_NAME" revision="b01bfbf496d8fb8bd83821f6cd3aa46c15814671" upstream="main" dest-branch="main"/>
<project name="PNG_RTOS" remote="REMOTE_NAME" revision="1d7f4fe8d3860dc1262f85d341a0949467ce48c5" upstream="main" dest-branch="main"/>
<project name="PNG_Drivers" remote="REMOTE_NAME" revision="29bc3f4f2f232b5af66e2f87d4d155737eac57ad" upstream="main" dest-branch="main"/>
</manifest>
My question is that I would expect that if for a certain subrepo (such as PNG_MCU for example) I was checked out on a branch that was NOT 'main' then I would expect to see that in the manifest file in the PNG_MCU row. But when I update the manifest file then it still shows 'main' as the branch under "upstream" even though the commit ID SHA that it is pointing to is NOT on main.
When I do repo sync all works well because the SHA are always correct but the branch part bothers me. I simply need this as part of a test script I am writing with github actions.
Any idea how to get the branch upstream to correlate with the commit SHA?