cpb- / yocto-cooker

Meta buildtool for Yocto Project based Linux embedded systems
GNU General Public License v2.0
43 stars 22 forks source link

Directly clone target rev or branch #139

Closed AdrienMatricon closed 1 year ago

AdrienMatricon commented 1 year ago

Currently, cooker clones the main branch of source repository, then checks out the correct branch or revision. This pull requests ensures that the clone is already done with the correct revision or branch if specified.

This may seem redundant, but if you fork a repo with submodules, create your own branch, and push a commit on it so that the forked repo uses forked submodules, you don't want --recurse-submodules to happen on master and fetch the wrong submodules

Edit: I forgot to mention: since I was already modifying update_directory_initial() to take in the same arguments as update_directory, I took the liberty of also putting them in the same order instead of just adding the new ones at the end