pull/4236/head
bunsenstraat 1 year ago committed by yann300
parent c068e01718
commit 7c536876ce
  1. 11
      apps/remix-ide/src/app/files/dgitProvider.js

@ -355,7 +355,7 @@ class DGitProvider extends Plugin {
const cmd = { const cmd = {
url: module.url, url: module.url,
singleBranch: true, singleBranch: true,
depth: 5000, // this is needed because we need the history to find the commit hash depth: 1,
...await this.parseInput(input), ...await this.parseInput(input),
...await this.getGitConfig(dir) ...await this.getGitConfig(dir)
} }
@ -379,10 +379,19 @@ class DGitProvider extends Plugin {
}) })
if(result && result.length) { if(result && result.length) {
this.call('terminal', 'logHtml', `Checking out submodule ${dir} to ${result[0]} in directory ${dir}`) this.call('terminal', 'logHtml', `Checking out submodule ${dir} to ${result[0]} in directory ${dir}`)
await git.fetch({
...await this.parseInput(input),
...await this.getGitConfig(dir),
singleBranch: true,
ref: result[0]
})
await git.checkout({ await git.checkout({
...await this.getGitConfig(dir), ...await this.getGitConfig(dir),
ref: result[0] ref: result[0]
}) })
this.call('terminal', 'logHtml',`Checked out submodule ${dir} to ${result[0]}`) this.call('terminal', 'logHtml',`Checked out submodule ${dir} to ${result[0]}`)
} }

Loading…
Cancel
Save