feat: Redesign git changes to split stage/unstaged files. (#1359)
* feat: Redesign git changes to split stage/unstaged files. Signed-off-by: Paolo Insogna <paolo@cowtech.it> * fixup Signed-off-by: Paolo Insogna <paolo@cowtech.it> * fixup Signed-off-by: Paolo Insogna <paolo@cowtech.it> * refactor: streamline git changes panel * fix: label staged and working diff tabs * fix: isolate staged and working diff files * fix: scope staged and working diff updates * fix: scope git row revert to working changes --------- Signed-off-by: Paolo Insogna <paolo@cowtech.it> Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
committed by
GitHub
co-authored by
Bohdan Triapitsyn
parent
9af0de0056
commit
e16097b05d
@@ -63,8 +63,24 @@ export const createVSCodeGitAPI = (): GitAPI => ({
|
||||
});
|
||||
},
|
||||
|
||||
revertGitFile: async (directory: string, filePath: string): Promise<void> => {
|
||||
await sendBridgeMessage('api:git/revert', { directory, path: filePath });
|
||||
revertGitFile: async (directory: string, filePath: string, options?: { scope?: 'all' | 'working' }): Promise<void> => {
|
||||
await sendBridgeMessage('api:git/revert', { directory, path: filePath, scope: options?.scope });
|
||||
},
|
||||
|
||||
stageGitFile: async (directory: string, filePath: string): Promise<void> => {
|
||||
await sendBridgeMessage('api:git/stage', { directory, path: filePath });
|
||||
},
|
||||
|
||||
stageGitFiles: async (directory: string, filePaths: string[]): Promise<void> => {
|
||||
await sendBridgeMessage('api:git/stage', { directory, paths: filePaths });
|
||||
},
|
||||
|
||||
unstageGitFile: async (directory: string, filePath: string): Promise<void> => {
|
||||
await sendBridgeMessage('api:git/unstage', { directory, path: filePath });
|
||||
},
|
||||
|
||||
unstageGitFiles: async (directory: string, filePaths: string[]): Promise<void> => {
|
||||
await sendBridgeMessage('api:git/unstage', { directory, paths: filePaths });
|
||||
},
|
||||
|
||||
isLinkedWorktree: async (directory: string): Promise<boolean> => {
|
||||
@@ -182,6 +198,7 @@ export const createVSCodeGitAPI = (): GitAPI => ({
|
||||
message,
|
||||
addAll: options?.addAll,
|
||||
files: options?.files,
|
||||
stageFiles: options?.stageFiles,
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user