pull/5370/head
filip mertens 2 years ago committed by Aniket
parent f73838a0a9
commit e3fd66f8b8
  1. 8
      apps/remix-ide/src/app/files/dgitProvider.js

@ -158,14 +158,19 @@ class DGitProvider extends Plugin {
} }
async currentbranch (config) { async currentbranch (config) {
try{
const defaultConfig = await this.getGitConfig() const defaultConfig = await this.getGitConfig()
const cmd = config ? defaultConfig ? { ...defaultConfig, ...config } : config : defaultConfig const cmd = config ? defaultConfig ? { ...defaultConfig, ...config } : config : defaultConfig
const name = await git.currentBranch(cmd) const name = await git.currentBranch(cmd)
return name return name
}catch(e){
return ''
}
} }
async branches (config) { async branches (config) {
try{
const defaultConfig = await this.getGitConfig() const defaultConfig = await this.getGitConfig()
const cmd = config ? defaultConfig ? { ...defaultConfig, ...config } : config : defaultConfig const cmd = config ? defaultConfig ? { ...defaultConfig, ...config } : config : defaultConfig
const remotes = await this.remotes(config) const remotes = await this.remotes(config)
@ -177,6 +182,9 @@ class DGitProvider extends Plugin {
branches = [...branches, ...remotebranches] branches = [...branches, ...remotebranches]
} }
return branches return branches
}catch(e){
return []
}
} }
async commit (cmd) { async commit (cmd) {

Loading…
Cancel
Save