From d75ad6cd214a5347ca3c4372aa012afb7f32f31d Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 4 Sep 2019 01:42:34 -0400 Subject: [PATCH] Ensures flags won't be overwritten --- src/commands/git/fetch.ts | 2 +- src/commands/git/pull.ts | 2 +- src/commands/git/push.ts | 2 +- src/commands/git/stash.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/git/fetch.ts b/src/commands/git/fetch.ts index ca7d897..8979e1b 100644 --- a/src/commands/git/fetch.ts +++ b/src/commands/git/fetch.ts @@ -148,7 +148,7 @@ export class FetchGitCommand extends QuickCommandBase { state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } this.execute(state as State); diff --git a/src/commands/git/pull.ts b/src/commands/git/pull.ts index 25ac5cb..cc8a6d5 100644 --- a/src/commands/git/pull.ts +++ b/src/commands/git/pull.ts @@ -125,7 +125,7 @@ export class PullGitCommand extends QuickCommandBase { state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } this.execute(state as State); diff --git a/src/commands/git/push.ts b/src/commands/git/push.ts index b9af39f..46211d5 100644 --- a/src/commands/git/push.ts +++ b/src/commands/git/push.ts @@ -125,7 +125,7 @@ export class PushGitCommand extends QuickCommandBase { state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } this.execute(state as State); diff --git a/src/commands/git/stash.ts b/src/commands/git/stash.ts index 8f8771d..4a11280 100644 --- a/src/commands/git/stash.ts +++ b/src/commands/git/stash.ts @@ -358,7 +358,7 @@ export class StashGitCommand extends QuickCommandBase { state.subcommand = selection[0].command; state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } void Container.git.stashApply(state.repo.path, state.stash!.stashName, state.subcommand === 'pop'); @@ -521,7 +521,7 @@ export class StashGitCommand extends QuickCommandBase { state.flags = selection[0].item; } else { - state.flags = []; + state.flags = state.flags || []; } void Container.git.stashSave(state.repo.path, state.message, state.uris, {