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