()
| 170 | * Untracked files are ignored because they won't be lost during branch switching |
| 171 | */ |
| 172 | export async function validateGitState(): Promise<void> { |
| 173 | const isClean = await getIsClean({ |
| 174 | ignoreUntracked: true |
| 175 | }); |
| 176 | if (!isClean) { |
| 177 | logEvent('tengu_teleport_error_git_not_clean', {}); |
| 178 | const error = new TeleportOperationError('Git working directory is not clean. Please commit or stash your changes before using --teleport.', chalk.red('Error: Git working directory is not clean. Please commit or stash your changes before using --teleport.\n')); |
| 179 | throw error; |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * Fetches a specific branch from remote origin |
no test coverage detected