Skip to content

Commit b7e9cbd

Browse files
committed
git_utils: Fix '--force' option
1 parent 327079f commit b7e9cbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mbed_tools/project/_internal/git_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def checkout(repo: git.Repo, ref: str, force: bool = False) -> None:
5555
VersionControlError: Check out failed.
5656
"""
5757
try:
58-
repo.git.checkout(f"--force {ref}" if force else str(ref))
58+
repo.git.checkout(ref, "--force" if force else "")
5959
except git.exc.GitCommandError as err:
6060
raise VersionControlError(f"Failed to check out revision '{ref}'. Error from VCS: {err}")
6161

0 commit comments

Comments
 (0)