Skip to content

Commit

Permalink
Only call git checkout when it is not head of the working copy
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron committed Nov 18, 2024
1 parent 380aa5a commit 985878a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion robot_descriptions/_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 985878a

Please sign in to comment.