|
|
|
@ -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 |
|
|
|
|