소스 검색

Adds terminalSquashBranchIntoCommit command

main
Eric Amodio 7 년 전
부모
커밋
0619af34d4
4개의 변경된 파일35개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -2
      README.md
  3. +24
    -0
      package.json
  4. +8
    -0
      src/views/explorerCommands.ts

+ 1
- 0
CHANGELOG.md 파일 보기

@ -27,6 +27,7 @@ ATTENTION! To support multi-root workspaces some underlying fundamentals had to
- Adds `Create Branch (via Terminal)...` command (`gitlens.terminalCreateBranch`) to branch node(s) of the `GitLens` custom view
- Adds `Delete Branch (via Terminal)` command (`gitlens.terminalDeleteBranch`) to branch node(s) of the `GitLens` custom view
- Adds `Rebase Branch to Remote (via Terminal)` command (`gitlens.terminalRebaseBranchToRemote`) to branch node(s) of the `GitLens` custom view
- Adds `Squash Branch into Commit (via Terminal)` command (`gitlens.terminalSquashBranchIntoCommit`) to branch node(s) of the `GitLens` custom view
- Adds `Rebase Commit (via Terminal)` command (`gitlens.terminalRebaseCommit`) to commit node(s) of the `GitLens` custom view
- Adds `Reset Commit (via Terminal)` command (`gitlens.terminalResetCommit`) to commit node(s) of the `GitLens` custom view
- Adds ability to specify the url protocol used with user-defined remote services via `gitlens.remotes` setting -- thanks to [PR #192](https://github.com/eamodio/vscode-gitlens/pull/192) by Helmut Januschka ([@hjanuschka](https://github.com/hjanuschka))!

+ 2
- 2
README.md 파일 보기

@ -164,7 +164,7 @@ GitLens provides an unobtrusive blame annotation at the end of the current line,
- Expand each revision (commit) to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
- Provides a context menu on each revision (commit) with `Open Commit in Remote`, `Open All Changes`, `Open All Changes with Working Tree`, `Open Files`, `Open Revisions`, `Copy Commit ID to Clipboard`, `Copy Commit Message to Clipboard`, `Show Commit Details`, `Rebase Commit (via Terminal)`, `Reset Commit (via Terminal)`, and `Refresh` commands
- Provides a context menu on each changed file with `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, `Open Revision in Remote`, `Apply Changes`, and `Show Commit File Details` commands
- Provides a context menu on each branch with `Open Branch in Remote`, `Checkout Branch (via Terminal)`, `Create Branch (via Terminal)...`, `Delete Branch (via Terminal)`, `Rebase Branch to Remote (via Terminal)`, and `Refresh` commands
- Provides a context menu on each branch with `Open Branch in Remote`, `Checkout Branch (via Terminal)`, `Create Branch (via Terminal)...`, `Delete Branch (via Terminal)`, `Rebase Branch to Remote (via Terminal)`, `Squash Branch into Commit (via Terminal)`, and `Refresh` commands
- Provides a context menu with `Open Branches in Remote`, and `Refresh` commands
- `Remotes` node — provides a list of remotes
@ -174,7 +174,7 @@ GitLens provides an unobtrusive blame annotation at the end of the current line,
- Expand each revision (commit) to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
- Provides a context menu on each revision (commit) with `Open Commit in Remote`, `Open All Changes`, `Open All Changes with Working Tree`, `Open Files`, `Open Revisions`, `Copy Commit ID to Clipboard`, `Copy Commit Message to Clipboard`,`Show Commit Details`, and `Refresh` commands
- Provides a context menu on each changed file with `Open Changes`, `Open Changes with Working Tree`, `Open File`, `Open Revision`, `Open File in Remote`, `Open Revision in Remote`, `Apply Changes`, `Show File History`, and `Show Commit File Details` commands
- Provides a context menu on each remote branch with `Open Branch in Remote`, `Checkout Branch (via Terminal)`, `Create Branch (via Terminal)...`, `Delete Branch (via Terminal)`, and `Refresh` commands
- Provides a context menu on each remote branch with `Open Branch in Remote`, `Checkout Branch (via Terminal)`, `Create Branch (via Terminal)...`, `Delete Branch (via Terminal)`, `Squash Branch into Commit (via Terminal)`, and `Refresh` commands
- Provides a context menu on each remote with `Open Branches in Remote`, `Open Repository in Remote`, and `Refresh` commands
- Provides a context menu with a `Refresh` command

+ 24
- 0
package.json 파일 보기

@ -1346,6 +1346,11 @@
"category": "GitLens"
},
{
"command": "gitlens.gitExplorer.terminalSquashBranchIntoCommit",
"title": "Squash Branch into Commit (via Terminal)",
"category": "GitLens"
},
{
"command": "gitlens.gitExplorer.terminalRebaseCommit",
"title": "Rebase Commit (via Terminal)",
"category": "GitLens"
@ -1603,6 +1608,10 @@
"when": "false"
},
{
"command": "gitlens.gitExplorer.terminalSquashBranchIntoCommit",
"when": "false"
},
{
"command": "gitlens.gitExplorer.terminalRebaseCommit",
"when": "false"
},
@ -1893,6 +1902,11 @@
"group": "8_gitlens@3"
},
{
"command": "gitlens.gitExplorer.terminalSquashBranchIntoCommit",
"when": "view == gitlens.gitExplorer && viewItem == gitlens:branch-history",
"group": "8_gitlens@4"
},
{
"command": "gitlens.openBranchInRemote",
"when": "view == gitlens.gitExplorer && viewItem == gitlens:branch-history:tracking",
"group": "1_gitlens@1"
@ -1913,6 +1927,11 @@
"group": "8_gitlens@3"
},
{
"command": "gitlens.gitExplorer.terminalSquashBranchIntoCommit",
"when": "view == gitlens.gitExplorer && viewItem == gitlens:branch-history:tracking",
"group": "8_gitlens@4"
},
{
"command": "gitlens.gitExplorer.terminalCreateBranch",
"when": "view == gitlens.gitExplorer && viewItem == gitlens:current-branch-history",
"group": "8_gitlens@1"
@ -1953,6 +1972,11 @@
"group": "8_gitlens@3"
},
{
"command": "gitlens.gitExplorer.terminalSquashBranchIntoCommit",
"when": "view == gitlens.gitExplorer && viewItem == gitlens:remote-branch-history",
"group": "8_gitlens@4"
},
{
"command": "gitlens.openCommitInRemote",
"when": "gitlens:hasRemotes && view == gitlens.gitExplorer && viewItem == gitlens:commit",
"group": "1_gitlens@1"

+ 8
- 0
src/views/explorerCommands.ts 파일 보기

@ -40,6 +40,7 @@ export class ExplorerCommands extends Disposable {
commands.registerCommand('gitlens.gitExplorer.terminalCreateBranch', this.terminalCreateBranch, this);
commands.registerCommand('gitlens.gitExplorer.terminalDeleteBranch', this.terminalDeleteBranch, this);
commands.registerCommand('gitlens.gitExplorer.terminalRebaseBranchToRemote', this.terminalRebaseBranchToRemote, this);
commands.registerCommand('gitlens.gitExplorer.terminalSquashBranchIntoCommit', this.terminalSquashBranchIntoCommit, this);
commands.registerCommand('gitlens.gitExplorer.terminalRebaseCommit', this.terminalRebaseCommit, this);
commands.registerCommand('gitlens.gitExplorer.terminalResetCommit', this.terminalResetCommit, this);
}
@ -184,6 +185,13 @@ export class ExplorerCommands extends Disposable {
this.sendTerminalCommand(command);
}
terminalSquashBranchIntoCommit(node: ExplorerNode) {
if (!(node instanceof BranchHistoryNode)) return;
const command = `merge --squash ${node.branch.name}`;
this.sendTerminalCommand(command);
}
terminalRebaseCommit(node: ExplorerNode) {
if (!(node instanceof CommitNode)) return;

불러오는 중...
취소
저장