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