def checkout(self, ref: str, track: bool = False) -> None: if self.is_dirty: CONSOLE.stdout( ' - Dirty repo. Please stash, commit, or discard your changes') self.status(verbose=True) return GitOffline.checkout(self.path, ref=ref, track=track)
def checkout(self, check: bool = True, track: bool = False) -> None: try: GitOffline.checkout(self.path, ref=self.short_ref, track=track) except Exception: # noqa message = f'Failed to checkout' if check: GIT_LOG.error(message) raise CONSOLE.stdout(f' - {message}')