Sfoglia il codice sorgente

Adds Open Git Worktree command

main
Eric Amodio 1 anno fa
parent
commit
1fd62bda1e
4 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  1. +1
    -0
      CHANGELOG.md
  2. +9
    -0
      package.json
  3. +4
    -0
      src/commands/gitCommands.ts
  4. +1
    -0
      src/constants.ts

+ 1
- 0
CHANGELOG.md Vedi File

@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Added
- Adds an experimental _Generate Commit Message (Experimental)_ command to use OpenAI to generate a commit message for staged changes — currently only available in the pre-release edition
- Adds a _Open Git Worktree..._ command to jump directly to opening a worktree in the _Git Command Palette_
### Fixed

+ 9
- 0
package.json Vedi File

@ -4953,6 +4953,11 @@
"category": "GitLens+"
},
{
"command": "gitlens.gitCommands.worktree.open",
"title": "Open Git Worktree...",
"category": "GitLens+"
},
{
"command": "gitlens.switchMode",
"title": "Switch Mode",
"category": "GitLens"
@ -7737,6 +7742,10 @@
"when": "!gitlens:disabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"
},
{
"command": "gitlens.gitCommands.worktree.open",
"when": "!gitlens:disabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"
},
{
"command": "gitlens.switchMode",
"when": "gitlens:enabled"
},

+ 4
- 0
src/commands/gitCommands.ts Vedi File

@ -82,6 +82,7 @@ export class GitCommandsCommand extends Command {
Commands.GitCommandsSwitch,
Commands.GitCommandsTag,
Commands.GitCommandsWorktree,
Commands.GitCommandsWorktreeOpen,
]);
}
@ -114,6 +115,9 @@ export class GitCommandsCommand extends Command {
case Commands.GitCommandsWorktree:
args = { command: 'worktree' };
break;
case Commands.GitCommandsWorktreeOpen:
args = { command: 'worktree', state: { subcommand: 'open' } };
break;
}
return this.execute(args);

+ 1
- 0
src/constants.ts Vedi File

@ -172,6 +172,7 @@ export const enum Commands {
GitCommandsSwitch = 'gitlens.gitCommands.switch',
GitCommandsTag = 'gitlens.gitCommands.tag',
GitCommandsWorktree = 'gitlens.gitCommands.worktree',
GitCommandsWorktreeOpen = 'gitlens.gitCommands.worktree.open',
OpenOrCreateWorktreeForGHPR = 'gitlens.ghpr.views.openOrCreateWorktree',
PlusHide = 'gitlens.plus.hide',
PlusLearn = 'gitlens.plus.learn',

Caricamento…
Annulla
Salva