set clone depth

pull/4995/head
bunsenstraat 7 months ago committed by yann300
parent ecf843a7d4
commit fe6e344d00
  1. 3
      libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
  2. 6
      libs/remix-ui/workspace/src/lib/actions/workspace.ts

@ -129,7 +129,8 @@ function HomeTabGetStarted({ plugin }: HomeTabGetStartedProps) {
{
url: metadata.url,
branch: metadata.branch,
workspaceName: templateDisplayName
workspaceName: templateDisplayName,
depth: 10
})
} else if (metadata && metadata.type === 'plugin') {
await plugin.appManager.activatePlugin('filePanel')

@ -224,7 +224,7 @@ export const createWorkspaceTemplate = async (workspaceName: string, template: W
if ((await workspaceExists(workspaceName)) && template === 'remixDefault') throw new Error('workspace already exists')
else if (metadata && metadata.type === 'git') {
dispatch(cloneRepositoryRequest())
await dgitPlugin.call('dgitApi', 'clone', { url: metadata.url, branch: metadata.branch, workspaceName: workspaceName })
await dgitPlugin.call('dgitApi', 'clone', { url: metadata.url, branch: metadata.branch, workspaceName: workspaceName, depth: 10 })
dispatch(cloneRepositorySuccess())
} else {
const workspaceProvider = plugin.fileProviders.workspace
@ -645,7 +645,7 @@ export const getWorkspaces = async (): Promise<{ name: string; isGitRepo: boolea
export const cloneRepository = async (url: string) => {
const config = plugin.registry.get('config').api
const token = config.get('settings/gist-access-token')
const repoConfig: cloneInputType = { url, token }
const repoConfig: cloneInputType = { url, token, depth: 10 }
if (plugin.registry.get('platform').api.isDesktop()) {
try {
@ -662,7 +662,7 @@ export const cloneRepository = async (url: string) => {
const repoName = await getRepositoryTitle(url)
await createWorkspace(repoName, 'blank', null, true, null, true, false)
const promise = dgitPlugin.call('dgitApi', 'clone', { ...repoConfig, workspaceExists: true, workspaceName: repoName })
const promise = dgitPlugin.call('dgitApi', 'clone', { ...repoConfig, workspaceExists: true, workspaceName: repoName, depth:10 })
dispatch(cloneRepositoryRequest())
promise

Loading…
Cancel
Save