初步支持远程Git管理
This commit is contained in:
@@ -25,6 +25,7 @@ import type {
|
||||
GitPushResult,
|
||||
GitMergeResult,
|
||||
GitCommitResult,
|
||||
GitRemote,
|
||||
PreflightResult,
|
||||
FolderCommand,
|
||||
TerminalInfo,
|
||||
@@ -522,6 +523,40 @@ export async function gitStashPop(path: string): Promise<string> {
|
||||
return invoke("git_stash_pop", { path })
|
||||
}
|
||||
|
||||
export async function gitListRemotes(path: string): Promise<GitRemote[]> {
|
||||
return invoke("git_list_remotes", { path })
|
||||
}
|
||||
|
||||
export async function gitFetchRemote(
|
||||
path: string,
|
||||
name: string
|
||||
): Promise<string> {
|
||||
return invoke("git_fetch_remote", { path, name })
|
||||
}
|
||||
|
||||
export async function gitAddRemote(
|
||||
path: string,
|
||||
name: string,
|
||||
url: string
|
||||
): Promise<void> {
|
||||
return invoke("git_add_remote", { path, name, url })
|
||||
}
|
||||
|
||||
export async function gitRemoveRemote(
|
||||
path: string,
|
||||
name: string
|
||||
): Promise<void> {
|
||||
return invoke("git_remove_remote", { path, name })
|
||||
}
|
||||
|
||||
export async function gitSetRemoteUrl(
|
||||
path: string,
|
||||
name: string,
|
||||
url: string
|
||||
): Promise<void> {
|
||||
return invoke("git_set_remote_url", { path, name, url })
|
||||
}
|
||||
|
||||
export async function gitStatus(path: string): Promise<GitStatusEntry[]> {
|
||||
return invoke("git_status", { path })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user