From 50dfcaa047ae862ad9b6ae05622a5d2bfa5f1139 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 11 Aug 2018 22:17:38 +0300 Subject: Fix: clean up before pulling In case the work tree is dirty. --- pipelines/get_sources.ick | 2 ++ 1 file changed, 2 insertions(+) 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() -- cgit v1.2.1