litex_setup: Switch to specific branch when initializing repositories.

This commit is contained in:
Florent Kermarrec 2022-06-20 10:43:30 +02:00
parent ef2f1bd65b
commit 9b6c9e6630
1 changed files with 2 additions and 0 deletions

View File

@ -212,6 +212,8 @@ def litex_setup_init_repos(config="standard", tag=None, dev_mode=False):
options = "--recursive" if repo.clone == "recursive" else ""
), shell=True)
os.chdir(os.path.join(current_path, name))
# Use specific Branch.
subprocess.check_call("git checkout " + repo.branch, shell=True)
# Use specific Tag (Optional).
if repo.tag is not None:
# Priority to passed tag (if specified).