|
|
@ -62,7 +62,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async status(cmd: statusInput) { |
|
|
|
async status(cmd: statusInput) { |
|
|
|
console.log('status', cmd) |
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
throw new Error('No working directory') |
|
|
|
throw new Error('No working directory') |
|
|
|
} |
|
|
|
} |
|
|
@ -80,14 +80,13 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
...(await this.getGitConfig()), |
|
|
|
...(await this.getGitConfig()), |
|
|
|
...cmd, |
|
|
|
...cmd, |
|
|
|
}) |
|
|
|
}) |
|
|
|
//console.log('STATUS', status, await this.getGitConfig())
|
|
|
|
|
|
|
|
return status |
|
|
|
return status |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async log(cmd: logInputType) { |
|
|
|
async log(cmd: logInputType) { |
|
|
|
console.log('LOG', cmd) |
|
|
|
|
|
|
|
const token = await this.call('config' as any, 'getAppParameter', 'settings/gist-access-token') |
|
|
|
const token = await this.call('config' as any, 'getAppParameter', 'settings/gist-access-token') |
|
|
|
console.log('LOG', token) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.workingDir === '') { |
|
|
|
if (this.workingDir === '') { |
|
|
|
return [] |
|
|
|
return [] |
|
|
@ -98,7 +97,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
...cmd, |
|
|
|
...cmd, |
|
|
|
depth: cmd.depth || 10, |
|
|
|
depth: cmd.depth || 10, |
|
|
|
}) |
|
|
|
}) |
|
|
|
console.log('LOG') |
|
|
|
|
|
|
|
return log |
|
|
|
return log |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -173,7 +172,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async resolveref(cmd: resolveRefInput) { |
|
|
|
async resolveref(cmd: resolveRefInput) { |
|
|
|
console.log('RESOLVE REF', cmd) |
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
return null |
|
|
|
return null |
|
|
|
} |
|
|
|
} |
|
|
@ -182,7 +181,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
...(await this.getGitConfig()), |
|
|
|
...(await this.getGitConfig()), |
|
|
|
...cmd, |
|
|
|
...cmd, |
|
|
|
}) |
|
|
|
}) |
|
|
|
console.log('RESOLVE REF', resolveref) |
|
|
|
|
|
|
|
return resolveref |
|
|
|
return resolveref |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -200,7 +199,6 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async checkout(cmd: checkoutInputType) { |
|
|
|
async checkout(cmd: checkoutInputType) { |
|
|
|
console.log('CHECKOUT', cmd) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
throw new Error('No working directory') |
|
|
|
throw new Error('No working directory') |
|
|
@ -217,7 +215,6 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async push(input: pushInputType) { |
|
|
|
async push(input: pushInputType) { |
|
|
|
console.log('PUSH', input, this.gitIsInstalled) |
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
throw new Error('No working directory') |
|
|
|
throw new Error('No working directory') |
|
|
|
} |
|
|
|
} |
|
|
@ -231,7 +228,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async pull(input: pullInputType) { |
|
|
|
async pull(input: pullInputType) { |
|
|
|
console.log('PULL', input) |
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
throw new Error('No working directory') |
|
|
|
throw new Error('No working directory') |
|
|
|
} |
|
|
|
} |
|
|
@ -245,7 +242,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async fetch(input: fetchInputType) { |
|
|
|
async fetch(input: fetchInputType) { |
|
|
|
console.log('FETCH', input) |
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
throw new Error('No working directory') |
|
|
|
throw new Error('No working directory') |
|
|
|
} |
|
|
|
} |
|
|
@ -298,7 +295,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async remotes() { |
|
|
|
async remotes() { |
|
|
|
console.log('REMOTES') |
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
} |
|
|
|
} |
|
|
@ -307,7 +304,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async currentbranch(input: currentBranchInput) { |
|
|
|
async currentbranch(input: currentBranchInput) { |
|
|
|
console.log('CURRENT BRANCH', input) |
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
return '' |
|
|
|
return '' |
|
|
|
} |
|
|
|
} |
|
|
@ -316,7 +313,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async branches(config: any) { |
|
|
|
async branches(config: any) { |
|
|
|
console.log('BRANCHES') |
|
|
|
|
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
if (!this.workingDir || this.workingDir === '') { |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
} |
|
|
|
} |
|
|
|