aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-02-17 12:15:56 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-02-17 12:15:56 +0100
commit2cb2015a6a9cecac3e204af9951675b981f19554 (patch)
treed534cc88cc95b2da613c4ee608fe3e4b2d438dce
parente300c8a75744702192b10a45b47dff714388cdaf (diff)
downloadallocbench-2cb2015a6a9cecac3e204af9951675b981f19554.tar.gz
allocbench-2cb2015a6a9cecac3e204af9951675b981f19554.zip
update existing GitArtifacts
-rw-r--r--src/artifact.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/artifact.py b/src/artifact.py
index 7f020f2..a358446 100644
--- a/src/artifact.py
+++ b/src/artifact.py
@@ -77,6 +77,14 @@ class GitArtifact(Artifact):
if not os.path.exists(self.repo):
self.retrieve()
+ # update repo
+ print_status(f'Updating git repository "{self.name}" ...')
+ try:
+ run_cmd(["git", "fetch"], output_verbosity=1, cwd=self.repo)
+ except CalledProcessError as e:
+ print_error(f"Failed to update {self.name}")
+ raise e
+
worktree_cmd = ["git", "worktree", "add", location, checkout]
print_debug("create new worktree. By running: ", worktree_cmd,
f"in {self.repo}")