From 58679ab44fcf7b3c5831d971c154f41e8493d114 Mon Sep 17 00:00:00 2001 From: Artem Bulgakov Date: Thu, 24 Dec 2020 22:39:08 +0300 Subject: [PATCH] Fix pulling when unrelated histories --- .ci/move_binary.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.ci/move_binary.py b/.ci/move_binary.py index 701dd56..b89cade 100755 --- a/.ci/move_binary.py +++ b/.ci/move_binary.py @@ -65,7 +65,16 @@ os.makedirs(directory, exist_ok=True) subprocess.check_call(["git", "config", "user.name", author_name]) subprocess.check_call(["git", "config", "user.email", author_email]) # Ensure that there are no changes -subprocess.check_call(["git", "pull", "origin", data_repository, "--ff-only"]) +subprocess.check_call( + [ + "git", + "pull", + "origin", + data_repository, + "--ff-only", + "--allow-unrelated-histories", + ] +) # Try to push several times for i in range(3): @@ -86,7 +95,15 @@ for i in range(3): ) # Pull new changes subprocess.check_call( - ["git", "pull", "origin", data_repository, "--force", "--ff-only"] + [ + "git", + "pull", + "origin", + data_repository, + "--force", + "--ff-only", + "--allow-unrelated-histories", + ] ) else: break # Exit loop if there is no errors