|
|
@ -76,11 +76,11 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
async status(cmd: any) { |
|
|
|
async status(cmd: any) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.workingDir === ''){ |
|
|
|
if (this.workingDir === '') { |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(this.gitIsInstalled){ |
|
|
|
if (this.gitIsInstalled) { |
|
|
|
const status = await gitProxy.status(this.workingDir) |
|
|
|
const status = await gitProxy.status(this.workingDir) |
|
|
|
return status |
|
|
|
return status |
|
|
|
} |
|
|
|
} |
|
|
@ -103,7 +103,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
if(this.workingDir === ''){ |
|
|
|
if (this.workingDir === '') { |
|
|
|
return [] |
|
|
|
return [] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -134,7 +134,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
return rm |
|
|
|
return rm |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async reset(cmd: any){ |
|
|
|
async reset(cmd: any) { |
|
|
|
|
|
|
|
|
|
|
|
const reset = await git.resetIndex({ |
|
|
|
const reset = await git.resetIndex({ |
|
|
|
...await this.getGitConfig(), |
|
|
|
...await this.getGitConfig(), |
|
|
@ -214,19 +214,30 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
|
|
|
|
|
|
|
|
async push(cmd: any) { |
|
|
|
async push(cmd: any) { |
|
|
|
|
|
|
|
|
|
|
|
console.log('PUSH', cmd) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.gitIsInstalled) { |
|
|
|
|
|
|
|
await gitProxy.push(this.workingDir, cmd.remote, cmd.ref, cmd.remoteRef, cmd.force) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
const push = await git.push({ |
|
|
|
const push = await git.push({ |
|
|
|
...await this.getGitConfig(), |
|
|
|
...await this.getGitConfig(), |
|
|
|
...cmd, |
|
|
|
...cmd, |
|
|
|
...parseInput(cmd.input) |
|
|
|
...parseInput(cmd.input) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return push |
|
|
|
return push |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async pull(cmd: any) { |
|
|
|
async pull(cmd: any) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.gitIsInstalled) { |
|
|
|
|
|
|
|
await gitProxy.pull(this.workingDir, cmd.remote, cmd.ref, cmd.remoteRef) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
const pull = await git.pull({ |
|
|
|
const pull = await git.pull({ |
|
|
|
...await this.getGitConfig(), |
|
|
|
...await this.getGitConfig(), |
|
|
|
...cmd, |
|
|
|
...cmd, |
|
|
@ -234,10 +245,17 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return pull |
|
|
|
return pull |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async fetch(cmd: any) { |
|
|
|
async fetch(cmd: any) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.gitIsInstalled) { |
|
|
|
|
|
|
|
await gitProxy.fetch(this.workingDir, cmd.remote, cmd.remoteRef) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
const fetch = await git.fetch({ |
|
|
|
const fetch = await git.fetch({ |
|
|
|
...await this.getGitConfig(), |
|
|
|
...await this.getGitConfig(), |
|
|
|
...cmd, |
|
|
|
...cmd, |
|
|
@ -246,6 +264,7 @@ class IsoGitPluginClient extends ElectronBasePluginClient { |
|
|
|
|
|
|
|
|
|
|
|
return fetch |
|
|
|
return fetch |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async clone(cmd: any) { |
|
|
|
async clone(cmd: any) { |
|
|
|
|
|
|
|
|
|
|
|