From 985878acbcc9e651542842e89bfdd1046705e537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Caron?= Date: Mon, 18 Nov 2024 16:58:24 +0100 Subject: [PATCH] Only call git checkout when it is not head of the working copy --- CHANGELOG.md | 4 ++++ robot_descriptions/_cache.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a16fcf..fb321ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file. - Description: Berkeley Humanoid +### Fixed + +- cache: Only call git checkout when it is not head of the working copy + ## [1.13.0] - 2024-10-30 ### Added diff --git a/robot_descriptions/_cache.py b/robot_descriptions/_cache.py index 30a0cb4..310c64d 100644 --- a/robot_descriptions/_cache.py +++ b/robot_descriptions/_cache.py @@ -85,7 +85,7 @@ def clone_to_directory( progress=progress_bar.update, ) - if commit is not None: + if commit is not None and commit != clone.head.object.hexsha: try: clone.git.checkout(commit) except GitCommandError: