From 4601e0bf08ade3b7d94ed436aad9d011a5b62d2d Mon Sep 17 00:00:00 2001 From: Fredrik Thulin Date: Mon, 30 Jan 2023 14:12:13 +0100 Subject: [PATCH] make sure we get clean checkouts --- global/post-tasks.d/018packages | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/global/post-tasks.d/018packages b/global/post-tasks.d/018packages index ee1889f..a48efbe 100755 --- a/global/post-tasks.d/018packages +++ b/global/post-tasks.d/018packages @@ -42,7 +42,8 @@ if [ -f $CONFIG -o $LOCALCONFIG ]; then if [ "$src" != "$(git config remote.origin.url)" ]; then git config remote.origin.url $src fi - git pull -q + # Update repo and clean out any local inconsistencies + git pull -q || (git fetch && git reset --hard) else continue fi