From 92c6c74bcfe7d3b31fb9ed93ab0f41b97a37055f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Mon, 24 Jun 2024 08:47:40 +0200 Subject: [PATCH] ansible/roles.py: fix pull call to handle up-to-date repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/roles.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ansible/roles.py b/ansible/roles.py index 2f12cf1..d2c4de9 100755 --- a/ansible/roles.py +++ b/ansible/roles.py @@ -216,7 +216,10 @@ class Role: def pull(self): self._git('remote', 'update') status = self._git('status', '--untracked-files=no') - if 'branch is behind' not in status: + + if 'branch is up to date' in status: + return True + elif 'branch is behind' not in status: return None rval = self._git('pull')