summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pipelines/get_sources.ick2
1 files changed, 2 insertions, 0 deletions
diff --git a/pipelines/get_sources.ick b/pipelines/get_sources.ick
index 7d68c81..552649f 100644
--- a/pipelines/get_sources.ick
+++ b/pipelines/get_sources.ick
@@ -54,6 +54,8 @@ pipelines:
ref_is_sha = re.match('^[a-fA-F0-9]+$', ref) is not None
mirror = os.path.join('.mirrors', name)
if os.path.exists(dirname):
+ RUN('git', 'clean', '-fdx', cwd=dirname)
+ RUN('git', 'reset', '--hard', cwd=dirname)
RUN('git', 'checkout', ref, cwd=dirname)
# Only pull if in a branch.
head = open('{}/.git/HEAD'.format(dirname)).read().strip()