updated: reset working tree in each submodule (#26316)

* updated: reset working tree in each submodule

* run after fetch too
pull/26358/head
Cameron Clough 3 years ago committed by GitHub
parent 9a8c7f2453
commit 15828c4fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      selfdrive/updated.py

@ -175,7 +175,7 @@ def finalize_update() -> None:
shutil.copytree(OVERLAY_MERGED, FINALIZED, symlinks=True)
run(["git", "reset", "--hard"], FINALIZED)
run(["git", "submodule", "foreach", "--recursive", "git", "reset"], FINALIZED)
run(["git", "submodule", "foreach", "--recursive", "git", "reset", "--hard"], FINALIZED)
cloudlog.info("Starting git cleanup in finalized update")
t = time.monotonic()
@ -374,8 +374,8 @@ class Updater:
["git", "reset", "--hard"],
["git", "clean", "-xdff"],
["git", "submodule", "sync"],
["git", "submodule", "init"],
["git", "submodule", "update"],
["git", "submodule", "update", "--init", "--recursive"],
["git", "submodule", "foreach", "--recursive", "git", "reset", "--hard"],
]
r = [run(cmd, OVERLAY_MERGED) for cmd in cmds]
cloudlog.info("git reset success: %s", '\n'.join(r))

Loading…
Cancel
Save