mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(reharden): --clone should also update existing repos
This commit is contained in:
@@ -189,6 +189,13 @@ if __name__ == "__main__":
|
|||||||
cloned_repo = git.Repo(repo_dir)
|
cloned_repo = git.Repo(repo_dir)
|
||||||
cloned_repo.git.submodule("update", "--init")
|
cloned_repo.git.submodule("update", "--init")
|
||||||
cloned_repo.git.checkout(commit)
|
cloned_repo.git.checkout(commit)
|
||||||
|
else:
|
||||||
|
cloned_repo = git.Repo(repo_dir)
|
||||||
|
if commit != cloned_repo.commit().hexsha:
|
||||||
|
logging.info(f"updating {number :03} {repo} to commit {commit}")
|
||||||
|
cloned_repo.git.fetch("origin")
|
||||||
|
cloned_repo.git.checkout(commit)
|
||||||
|
cloned_repo.git.submodule("update", "--init")
|
||||||
|
|
||||||
# get tt tools setup.
|
# get tt tools setup.
|
||||||
# can't run tt from another directory because gitpython fails
|
# can't run tt from another directory because gitpython fails
|
||||||
|
|||||||
Reference in New Issue
Block a user