瀏覽代碼

Fixes push to commit showing repo picker

Clarifies that commit will be included in push
main
Eric Amodio 4 年之前
父節點
當前提交
1596c6ab83
共有 2 個檔案被更改,包括 8 行新增2 行删除
  1. +1
    -0
      CHANGELOG.md
  2. +7
    -2
      src/commands/git/push.ts

+ 1
- 0
CHANGELOG.md 查看文件

@ -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 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 _Push to Commit..._ would incorrectly show a repository picker
## [11.0.6] - 2020-11.28

+ 7
- 2
src/commands/git/push.ts 查看文件

@ -109,7 +109,10 @@ export class PushGitCommand extends QuickCommand {
state.repos = [context.repos[0]];
} 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)
if (result === StepResult.Break) break;
@ -347,7 +350,9 @@ export class PushGitCommand extends QuickCommand {
if (state.reference != null) {
pushDetails = `${
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)}` : ''}`;
} else {

Loading…
取消
儲存