Skip to content

Commit

Permalink
Adds stash apply|drop|pop|push git commands
Browse files Browse the repository at this point in the history
Changes stash[Apply|Delete|Save] commands to use new git commands
  • Loading branch information
eamodio committed Aug 14, 2019
1 parent 5c3f6b5 commit 7b94606
Show file tree
Hide file tree
Showing 13 changed files with 647 additions and 206 deletions.
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -485,21 +485,28 @@
"type": "array",
"default": [
"checkout",
"fetch"
"fetch",
"stash-push"
],
"items": {
"type": "string",
"enum": [
"checkout",
"fetch",
"pull",
"push"
"push",
"stash-apply",
"stash-pop",
"stash-push"
],
"enumDescriptions": [
"Skips checkout command confirmation",
"Skips fetch command confirmation",
"Skips pull command confirmation",
"Skips push command confirmation"
"Skips push command confirmation",
"Skips stash apply command confirmation",
"Skips stash pop command confirmation",
"Skips stash push command confirmation"
]
},
"minItems": 0,
Expand Down
18 changes: 11 additions & 7 deletions src/commands/git/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import { Container } from '../../container';
import { GitBranch, GitTag, Repository } from '../../git/gitService';
import { GlyphChars } from '../../constants';
import { getBranchesAndOrTags, QuickCommandBase, QuickInputStep, QuickPickStep, StepState } from '../quickCommand';
import { BranchQuickPickItem, RepositoryQuickPickItem, TagQuickPickItem } from '../../quickpicks';
import {
BackOrCancelQuickPickItem,
BranchQuickPickItem,
RepositoryQuickPickItem,
TagQuickPickItem
} from '../../quickpicks';
import { Strings } from '../../system';
import { runGitCommandInTerminal } from '../../terminal';
import { Logger } from '../../logger';
Expand Down Expand Up @@ -100,14 +105,13 @@ export class MergeGitCommand extends QuickCommandBase<State> {
if (count === 0) {
const step = this.createConfirmStep(
`Confirm ${this.title}${Strings.pad(GlyphChars.Dot, 2, 2)}${state.repo.formattedName}`,
[
{
[],
{
cancel: BackOrCancelQuickPickItem.create(true, true, {
label: `Cancel ${this.title}`,
description: '',
detail: `${state.destination.name} is up to date with ${state.source.name}`
}
],
false
})
}
);

yield step;
Expand Down
18 changes: 11 additions & 7 deletions src/commands/git/rebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import { Container } from '../../container';
import { GitBranch, GitTag, Repository } from '../../git/gitService';
import { GlyphChars } from '../../constants';
import { getBranchesAndOrTags, QuickCommandBase, QuickInputStep, QuickPickStep, StepState } from '../quickCommand';
import { BranchQuickPickItem, RepositoryQuickPickItem, TagQuickPickItem } from '../../quickpicks';
import {
BackOrCancelQuickPickItem,
BranchQuickPickItem,
RepositoryQuickPickItem,
TagQuickPickItem
} from '../../quickpicks';
import { Strings } from '../../system';
import { runGitCommandInTerminal } from '../../terminal';
import { Logger } from '../../logger';
Expand Down Expand Up @@ -100,14 +105,13 @@ export class RebaseGitCommand extends QuickCommandBase<State> {
if (count === 0) {
const step = this.createConfirmStep(
`Confirm ${this.title}${Strings.pad(GlyphChars.Dot, 2, 2)}${state.repo.formattedName}`,
[
{
[],
{
cancel: BackOrCancelQuickPickItem.create(true, true, {
label: `Cancel ${this.title}`,
description: '',
detail: `${state.destination.name} is up to date with ${state.source.name}`
}
],
false
})
}
);

yield step;
Expand Down

0 comments on commit 7b94606

Please sign in to comment.