Fix "git reset" subcommand in virtual terminal

This commit is contained in:
Alex Gleason committed 2025-10-29 15:30:18 -05:00
1 parent d13bc84232
commit 4ca9feb252
2 files changed
+77 -19

No files matched your search

+6
View File
@@ -36,6 +36,9 @@ const mockGit = {
}),
writeRef: async () => {},
checkout: async () => {},
listFiles: async () => ['file1.txt', 'file2.txt', 'file3.txt'],
currentBranch: async () => 'main',
readBlob: async () => ({ blob: new Uint8Array([72, 101, 108, 108, 111]) }), // "Hello"
} as unknown as Git;
const mockFS = {
@@ -45,6 +48,9 @@ const mockFS = {
}
throw new Error('File not found');
},
writeFile: async () => {},
mkdir: async () => {},
unlink: async () => {},
} as unknown as JSRuntimeFS;
const mockOptions: GitSubcommandOptions = {