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

* updated: reset working tree in each submodule

* run after fetch too
old-commit-hash: 15828c4fea
taco
Cameron Clough 3 years ago committed by GitHub
parent a9e3d43246
commit edd1a638f0
  1. 6
      selfdrive/updated.py

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

Loading…
Cancel
Save