支持在git推送时选择远程源
This commit is contained in:
@@ -24,6 +24,7 @@ import type {
|
||||
GitBranchList,
|
||||
GitPullResult,
|
||||
GitPushResult,
|
||||
GitPushInfo,
|
||||
GitMergeResult,
|
||||
GitRebaseResult,
|
||||
GitConflictFileVersions,
|
||||
@@ -548,11 +549,20 @@ export async function gitFetch(
|
||||
return invoke("git_fetch", { path, credentials: credentials ?? null })
|
||||
}
|
||||
|
||||
export async function gitPushInfo(path: string): Promise<GitPushInfo> {
|
||||
return invoke("git_push_info", { path })
|
||||
}
|
||||
|
||||
export async function gitPush(
|
||||
path: string,
|
||||
remote?: string | null,
|
||||
credentials?: GitCredentials | null
|
||||
): Promise<GitPushResult> {
|
||||
return invoke("git_push", { path, credentials: credentials ?? null })
|
||||
return invoke("git_push", {
|
||||
path,
|
||||
remote: remote ?? null,
|
||||
credentials: credentials ?? null,
|
||||
})
|
||||
}
|
||||
|
||||
export async function gitNewBranch(
|
||||
@@ -1047,12 +1057,14 @@ export async function createFileTreeEntry(
|
||||
export async function gitLog(
|
||||
path: string,
|
||||
limit?: number,
|
||||
branch?: string
|
||||
branch?: string,
|
||||
remote?: string
|
||||
): Promise<GitLogResult> {
|
||||
return invoke("git_log", {
|
||||
path,
|
||||
limit: limit ?? null,
|
||||
branch: branch ?? null,
|
||||
remote: remote ?? null,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user