Browse Source

Fixes push to commit showing repo picker

Clarifies that commit will be included in push
main
Eric Amodio 4 years ago
parent
commit
1596c6ab83
2 changed files with 8 additions and 2 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +7
    -2
      src/commands/git/push.ts

+ 1
- 0
CHANGELOG.md View File

@ -46,6 +46,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Fixes an issue where _GitLens: Show Repositories View_ command wouldn't work unless the view was enabled first - Fixes an issue where _GitLens: Show Repositories View_ command wouldn't work unless the view was enabled first
- Fixes an issue where _GitLens: Show Line History View_ command wasn't showing up unless the view was enabled first - Fixes an issue where _GitLens: Show Line History View_ command wasn't showing up unless the view was enabled first
- Fixes an issue where trying to force push the current branch would fail - Fixes an issue where trying to force push the current branch would fail
- Fixes an issue where _Push to Commit..._ would incorrectly show a repository picker
## [11.0.6] - 2020-11.28 ## [11.0.6] - 2020-11.28

+ 7
- 2
src/commands/git/push.ts View File

@ -109,7 +109,10 @@ export class PushGitCommand extends QuickCommand {
state.repos = [context.repos[0]]; state.repos = [context.repos[0]];
} else if (state.reference != null) { } else if (state.reference != null) {
const result = yield* pickRepositoryStep(state, context);
const result = yield* pickRepositoryStep(
{ ...state, repos: undefined, repo: state.reference.repoPath },
context,
);
// Always break on the first step (so we will go back) // Always break on the first step (so we will go back)
if (result === StepResult.Break) break; if (result === StepResult.Break) break;
@ -347,7 +350,9 @@ export class PushGitCommand extends QuickCommand {
if (state.reference != null) { if (state.reference != null) {
pushDetails = `${ pushDetails = `${
status?.state.ahead status?.state.ahead
? ` commits up to ${GitReference.toString(state.reference, { label: false })}`
? ` commits up to and including ${GitReference.toString(state.reference, {
label: false,
})}`
: '' : ''
}${status?.upstream ? ` to ${GitBranch.getRemote(status.upstream)}` : ''}`; }${status?.upstream ? ` to ${GitBranch.getRemote(status.upstream)}` : ''}`;
} else { } else {

Loading…
Cancel
Save