mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-29 13:41:51 +02:00
Handle remote branches
This commit is contained in:
@@ -41,7 +41,7 @@ export function useGit(dir: string) {
|
||||
mutationFn: (args) => invoke('plugin:yaak-git|delete_branch', { dir, ...args }),
|
||||
onSuccess,
|
||||
}),
|
||||
checkout: useMutation<void, string, { branch: string; force: boolean }>({
|
||||
checkout: useMutation<string, string, { branch: string; force: boolean }>({
|
||||
mutationKey: ['git', 'checkout', dir],
|
||||
mutationFn: (args) => invoke('plugin:yaak-git|checkout', { dir, ...args }),
|
||||
onSuccess,
|
||||
@@ -51,6 +51,11 @@ export function useGit(dir: string) {
|
||||
mutationFn: (args) => invoke('plugin:yaak-git|commit', { dir, ...args }),
|
||||
onSuccess,
|
||||
}),
|
||||
fetchAll: useMutation<string, string, void>({
|
||||
mutationKey: ['git', 'checkout', dir],
|
||||
mutationFn: () => invoke('plugin:yaak-git|fetch_all', { dir }),
|
||||
onSuccess,
|
||||
}),
|
||||
push: useMutation<PushResult, string, void>({
|
||||
mutationKey: ['git', 'push', dir],
|
||||
mutationFn: () => invoke('plugin:yaak-git|push', { dir }),
|
||||
|
||||
Reference in New Issue
Block a user