MCPcopy Index your code
hub / github.com/codeaashu/claude-code / validateGitState

Function validateGitState

src/utils/teleport.tsx:172–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

170 * Untracked files are ignored because they won't be lost during branch switching
171 */
172export 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

Callers 2

runFunction · 0.85
loadInitialMessagesFunction · 0.85

Calls 2

getIsCleanFunction · 0.85
logEventFunction · 0.85

Tested by

no test coverage detected