From 71e0c4439f1a401f0e72450886d6e4f1d41aa567 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 14 Jan 2021 01:56:37 -0500 Subject: [PATCH] Fixes #1323 - uses built-in vscode command --- CHANGELOG.md | 3 ++- src/commands/git/rebase.ts | 31 ++++++++++--------------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e985799..a5cfb9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/commands/git/rebase.ts b/src/commands/git/rebase.ts index ebec6a0..ddc5b8a 100644 --- a/src/commands/git/rebase.ts +++ b/src/commands/git/rebase.ts @@ -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}"`];