Don’t fail tasks if a branch was fast-forward-pushed since the triggering push event

This commit is contained in:
Simon Sapin 2019-11-05 12:38:03 +01:00
parent 08705345d6
commit 7cf489c1f8

View file

@ -482,7 +482,7 @@ class WindowsGenericWorkerTask(GenericWorkerTask):
git += """
git fetch {depth} %GIT_URL% %GIT_REF%
git reset --hard %GIT_SHA%
""".format(depth="--depth 1" if shallow else "")
""".format(depth="--depth 100" if shallow else "")
return self \
.with_git() \
.with_script(git) \
@ -604,7 +604,7 @@ class UnixTaskMixin(Task):
cd repo
git fetch {depth} "$GIT_URL" "$GIT_REF"
git reset --hard "$GIT_SHA"
""".format(depth="--depth 1" if shallow else ""))
""".format(depth="--depth 100" if shallow else ""))
def with_curl_script(self, url, file_path):
self.curl_scripts_count += 1