mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Clear out untracked files when restoring a checkpoint (#1139)
This commit is contained in:
@@ -110,5 +110,7 @@ export class GitService {
|
|||||||
async restoreProjectFromSnapshot(commitHash: string): Promise<void> {
|
async restoreProjectFromSnapshot(commitHash: string): Promise<void> {
|
||||||
const repo = this.shadowGitRepository;
|
const repo = this.shadowGitRepository;
|
||||||
await repo.raw(['restore', '--source', commitHash, '.']);
|
await repo.raw(['restore', '--source', commitHash, '.']);
|
||||||
|
// Removes any untracked files that were introduced post snapshot.
|
||||||
|
await repo.clean('f', ['-d']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user