Pārlūkot izejas kodu

Fixes #1323 - uses built-in vscode command

main
Eric Amodio pirms 3 gadiem
vecāks
revīzija
71e0c4439f
2 mainītis faili ar 12 papildinājumiem un 22 dzēšanām
  1. +2
    -1
      CHANGELOG.md
  2. +10
    -21
      src/commands/git/rebase.ts

+ 2
- 1
CHANGELOG.md Parādīt failu

@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Adds a new _Browse Repository from Before Here_ (`gitlens.browseRepoBeforeRevision`) and _Browse Repository from Before Here in New Window_ (`gitlens.browseRepoBeforeRevisionInNewWindow`) commands
- Adds _Repository from Before Here_ and _Repository from Before Here in New Window_ to the _Browse_ submenu of commits in the views
- Adds a new _Copy Current Branch Name_ (`gitlens.copyCurrentBranch`) command to copy the current branch name to the clipboard — closes [#1306](https://github.com/eamodio/vscode-gitlens/issues/1306) — thanks to [PR #1307](https://github.com/eamodio/vscode-gitlens/pull/1307) by Ken Hom ([@kh0m](https://github.com/kh0m))
- Adds a `gitlens.advanced.abbreviateShaOnCopy` setting specify to whether to copy full or abbreviated commit SHAs to the clipboard. Abbreviates to the length of `gitlens.advanced.abbreviatedShaLength` — closes [#1062](https://github.com/eamodio/vscode-gitlens/issues/1062) — thanks to [PR #1316](https://github.com/eamodio/vscode-gitlens/pull/1316) by Brendon Smith ([@br3ndonland](https://github.com/br3ndonland))
- Adds a `gitlens.advanced.abbreviateShaOnCopy` setting to specify to whether to copy full or abbreviated commit SHAs to the clipboard. Abbreviates to the length of `gitlens.advanced.abbreviatedShaLength` — closes [#1062](https://github.com/eamodio/vscode-gitlens/issues/1062) — thanks to [PR #1316](https://github.com/eamodio/vscode-gitlens/pull/1316) by Brendon Smith ([@br3ndonland](https://github.com/br3ndonland))
### Changed
@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#1323](https://github.com/eamodio/vscode-gitlens/issues/1323) - Interactive rebase hangs
- Fixes [#1183](https://github.com/eamodio/vscode-gitlens/issues/1183) - stash all changes has no effect when the number of files is large
- Fixes [#1308](https://github.com/eamodio/vscode-gitlens/issues/1308) - Escape quotes for PRs titles
- Fixes [#1309](https://github.com/eamodio/vscode-gitlens/issues/1309) - "Fetch" not working on remote branches

+ 10
- 21
src/commands/git/rebase.ts Parādīt failu

@ -78,27 +78,16 @@ export class RebaseGitCommand extends QuickCommand {
await Container.rebaseEditor.enableForNextUse();
let editor;
if (env.remoteName) {
switch (env.appName) {
case 'Visual Studio Code - Insiders':
editor = 'code-insiders --wait --reuse-window';
break;
case 'Visual Studio Code - Exploration':
editor = 'code-exploration --wait --reuse-window';
break;
default:
editor = 'code --wait --reuse-window';
break;
}
} else {
let execPath = process.execPath.replace(/\\/g, '/');
if (process.platform === 'darwin') {
const index = execPath.indexOf('.app/Contents/');
if (index !== -1) {
execPath = `${execPath.substring(0, index)}.app/Contents/MacOS/Electron`;
}
}
editor = `'${execPath}' --wait --reuse-window`;
switch (env.appName) {
case 'Visual Studio Code - Insiders':
editor = 'code-insiders --wait --reuse-window';
break;
case 'Visual Studio Code - Exploration':
editor = 'code-exploration --wait --reuse-window';
break;
default:
editor = 'code --wait --reuse-window';
break;
}
configs = ['-c', `sequence.editor="${editor}"`];

Notiek ielāde…
Atcelt
Saglabāt