diff --git a/libs/remix-ui/git/src/components/buttons/commitmessage.tsx b/libs/remix-ui/git/src/components/buttons/commitmessage.tsx
index 2ed6ca26be..26f3110e70 100644
--- a/libs/remix-ui/git/src/components/buttons/commitmessage.tsx
+++ b/libs/remix-ui/git/src/components/buttons/commitmessage.tsx
@@ -42,13 +42,15 @@ export const CommitMessage = () => {
return context.upstream ? context.upstream : context.defaultRemote ? context.defaultRemote : null
}
- const getRemoteName = () => {
- return getRemote() ? getRemote().name : ''
- }
-
const sync = async() => {
- await actions.pull(getRemoteName(), context.currentBranch.name)
- await actions.push(getRemoteName(), context.currentBranch.name)
+ await actions.pull({
+ remote: getRemote(),
+ ref: context.currentBranch
+ })
+ await actions.push({
+ remote: getRemote(),
+ ref: context.currentBranch
+ })
}
const commitNotAllowed = () => {
diff --git a/libs/remix-ui/git/src/components/github/selectandclonerepositories.tsx b/libs/remix-ui/git/src/components/github/selectandclonerepositories.tsx
index 1de5f73ad6..06c8c653d4 100644
--- a/libs/remix-ui/git/src/components/github/selectandclonerepositories.tsx
+++ b/libs/remix-ui/git/src/components/github/selectandclonerepositories.tsx
@@ -29,7 +29,13 @@ export const SelectAndCloneRepositories = (props: RepositoriesProps) => {
const clone = async () => {
try {
- actions.clone(repo.html_url, branch.name, cloneDepth, !cloneAllBranches)
+ await actions.clone({
+ url: repo.html_url,
+ branch: branch.name,
+ depth: cloneDepth,
+ singleBranch: !cloneAllBranches
+ })
+ //actions.clone(repo.html_url, branch.name, cloneDepth, !cloneAllBranches)
} catch (e) {
// do nothing
}
diff --git a/libs/remix-ui/git/src/components/navigation/branchedetails.tsx b/libs/remix-ui/git/src/components/navigation/branchedetails.tsx
index a9a988603b..655f28f87e 100644
--- a/libs/remix-ui/git/src/components/navigation/branchedetails.tsx
+++ b/libs/remix-ui/git/src/components/navigation/branchedetails.tsx
@@ -46,7 +46,13 @@ export const BrancheDetailsNavigation = (props: BrancheDetailsNavigationProps) =
}
const fetchBranch = async () => {
- actions.fetch(null, branch.name, null, null, false, true)
+ await actions.fetch({
+ remote: null,
+ ref: branch,
+ singleBranch: true,
+ relative: true
+ })
+ //actions.fetch(null, branch.name, null, null, false, true)
}
return (
diff --git a/libs/remix-ui/git/src/components/navigation/remotesdetails.tsx b/libs/remix-ui/git/src/components/navigation/remotesdetails.tsx
index 2b941c3579..a3c7945256 100644
--- a/libs/remix-ui/git/src/components/navigation/remotesdetails.tsx
+++ b/libs/remix-ui/git/src/components/navigation/remotesdetails.tsx
@@ -56,7 +56,9 @@ export const RemotesDetailsNavigation = (props: RemotesDetailsNavigationProps) =
}
{
- await actions.fetch(remote.name)
+ await actions.fetch({
+ remote
+ })
}}>
actions.removeRemote(remote)}>
{remote?.url && openRemote()}>}
diff --git a/libs/remix-ui/git/src/components/panels/branches/remotebranchedetails.tsx b/libs/remix-ui/git/src/components/panels/branches/remotebranchedetails.tsx
index d5f5fbfa86..bdf1f4d9b4 100644
--- a/libs/remix-ui/git/src/components/panels/branches/remotebranchedetails.tsx
+++ b/libs/remix-ui/git/src/components/panels/branches/remotebranchedetails.tsx
@@ -74,7 +74,15 @@ export const RemoteBranchDetails = (props: BrancheDetailsProps) => {
console.log('CHANGES', changes)
if (!changes) {
// try to fetch the data
- await actions.fetch(branch.remote.name, branch.name,null,20, true, false, true)
+ //await actions.fetch(branch.remote.name, branch.name,null,20, true, false, true)
+ await actions.fetch({
+ remote: branch.remote,
+ ref: branch,
+ depth: 20,
+ singleBranch: true,
+ relative: false,
+ quiet: true
+ })
}
}
diff --git a/libs/remix-ui/git/src/components/panels/clone.tsx b/libs/remix-ui/git/src/components/panels/clone.tsx
index 276087af83..b86b0fdf13 100644
--- a/libs/remix-ui/git/src/components/panels/clone.tsx
+++ b/libs/remix-ui/git/src/components/panels/clone.tsx
@@ -32,7 +32,13 @@ export const Clone = () => {
);
const clone = async () => {
- await actions.clone(cloneUrl, cloneBranch, cloneDepth, !cloneAllBranches)
+ await actions.clone({
+ url: cloneUrl,
+ branch: cloneBranch,
+ depth: cloneDepth,
+ singleBranch: !cloneAllBranches
+ })
+ //await actions.clone(cloneUrl, cloneBranch, cloneDepth, !cloneAllBranches)
}
const onCloneBranchChange = (value: string) => {
diff --git a/libs/remix-ui/git/src/components/panels/commands/fetch.tsx b/libs/remix-ui/git/src/components/panels/commands/fetch.tsx
index 45d2adb2d2..f3b4a0bbb4 100644
--- a/libs/remix-ui/git/src/components/panels/commands/fetch.tsx
+++ b/libs/remix-ui/git/src/components/panels/commands/fetch.tsx
@@ -13,8 +13,13 @@ export const Fetch = () => {
return (
<>
-
actions.fetch()} className="btn btn-primary mr-1 w-50">Fetch {context.upstream && context.upstream.name}
-
actions.fetch(null, null, context.currentBranch.name, null, true )} className="btn btn-primary w-50 long-and-truncated">Fetch {context.currentBranch.name}
+
actions.fetch({
+ remote: context.upstream,
+ })} className="btn btn-primary mr-1 w-50">Fetch {context.upstream && context.upstream.name}
+
actions.fetch({
+ remote: context.upstream,
+ ref: context.currentBranch
+ })} className="btn btn-primary w-50 long-and-truncated">Fetch {context.currentBranch.name}
>)
}
\ No newline at end of file
diff --git a/libs/remix-ui/git/src/types/index.ts b/libs/remix-ui/git/src/types/index.ts
index d9a1cc80d9..066c45d0e4 100644
--- a/libs/remix-ui/git/src/types/index.ts
+++ b/libs/remix-ui/git/src/types/index.ts
@@ -76,7 +76,13 @@ export type compareBranchesInput = {
}
export type fetchInputType = {
- remote: remote, ref: branch, remoteRef?: branch, depth: number, singleBranch: boolean, relative: boolean, quiet?: boolean
+ remote: remote,
+ ref?: branch,
+ remoteRef?: branch,
+ depth?: number,
+ singleBranch?: boolean,
+ relative?: boolean,
+ quiet?: boolean
}
export type pullInputType = {
diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts
index c0a6846815..b7a491e8dd 100644
--- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts
+++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts
@@ -746,7 +746,7 @@ export const getGitRepoBranches = async (workspacePath: string) => {
fs: window.remixFileSystemCallback,
dir: addSlash(workspacePath),
}
- const branches: { remote: any; name: string }[] = await dgitPlugin.call('dgitApi', 'branches', { ...gitConfig })
+ const branches: branch[] = await dgitPlugin.call('dgitApi', 'branches', { ...gitConfig })
return branches
}