Skip to content

Commit 1ae92bc

Browse files
committed
Adds branch & tag git commands
1 parent 829a4b5 commit 1ae92bc

File tree

15 files changed

+1769
-248
lines changed

15 files changed

+1769
-248
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
88

99
### Added
1010

11+
- Adds a new commands to _Git Commands_ (`gitlens.gitCommands`)
12+
- Adds a new _branch_ command with sub-commands for _create_, _delete_, and _rename_
13+
- Adds a _Reveal Branch in Repositories View_ button to the quick pick menu toolbar
14+
- Adds keyboard navigation
15+
- `right arrow` — reveals the selected branch in the _Repositories_ view, if there is no text in the quick pick menu
16+
- `alt+left right`, `ctrl+left right`, `cmd+left right` (macOS) — reveals the selected branch in the _Repositories_ view
17+
- Adds a new _tag_ command with sub-commands for _create_, and _delete_
18+
- Adds a _Reveal Branch in Repositories View_ or _Reveal Tag in Repositories View_ button to the quick pick menu toolbar
19+
- Adds keyboard navigation
20+
- `right arrow` — reveals the selected branch or tag in the _Repositories_ view, if there is no text in the quick pick menu
21+
- `alt+left right`, `ctrl+left right`, `cmd+left right` (macOS) — reveals the selected branch or tag in the _Repositories_ view
1122
- Adds better co-author support — closes [#373](https://github.com/eamodio/vscode-gitlens/issues/373)
1223
- Adds a new _co-author_ command to the _Git Commands_ quick pick menu to add a co-author to a commit message
1324
- Adds a new _Add Co-authors_ command to the inline toolbar and context menu for the _Contributors_ node in the _Repositories_ view
@@ -16,6 +27,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1627
- Adds new actions options to the status bar blame
1728
- Adds a `gitlens.showCommitsInView` option to show the commit in the _Search Commits_ view
1829
- Adds a `gitlens.revealCommitInView` option to to reveal the commit in the _Repositories_ view
30+
- Adds a new _Rename Branch..._ command to branches in the _Repositories_ view
31+
32+
### Changed
33+
34+
- Changes the _Create Branch (via Terminal)..._ command to _Create Branch..._ and uses the _branch_ _create_ Git command
35+
- Changes the _Delete Branch (via Terminal)..._ command to _Delete Branch..._ and uses the _branch_ _delete_ Git command
36+
- Changes the _Create Tag (via Terminal)..._ command to _Create Tag..._ and uses the _tag_ _create_ Git command
37+
- Changes the _Delete Tag (via Terminal)..._ command to _Delete Tag..._ and uses the _tag_ _delete_ Git command
1938

2039
### Fixed
2140

package.json

Lines changed: 69 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,7 @@
24252425
},
24262426
{
24272427
"command": "gitlens.stashDelete",
2428-
"title": "Delete Stash",
2428+
"title": "Delete Stash...",
24292429
"category": "GitLens",
24302430
"icon": {
24312431
"dark": "images/dark/icon-delete.svg",
@@ -2884,18 +2884,33 @@
28842884
}
28852885
},
28862886
{
2887-
"command": "gitlens.views.terminalCreateBranch",
2888-
"title": "Create Branch (via Terminal)...",
2887+
"command": "gitlens.views.cherryPick",
2888+
"title": "Cherry Pick Commit...",
28892889
"category": "GitLens"
28902890
},
28912891
{
2892-
"command": "gitlens.views.terminalDeleteBranch",
2893-
"title": "Delete Branch (via Terminal)",
2892+
"command": "gitlens.views.createBranch",
2893+
"title": "Create Branch...",
28942894
"category": "GitLens"
28952895
},
28962896
{
2897-
"command": "gitlens.views.cherryPick",
2898-
"title": "Cherry Pick Commit",
2897+
"command": "gitlens.views.deleteBranch",
2898+
"title": "Delete Branch...",
2899+
"category": "GitLens"
2900+
},
2901+
{
2902+
"command": "gitlens.views.renameBranch",
2903+
"title": "Rename Branch...",
2904+
"category": "GitLens"
2905+
},
2906+
{
2907+
"command": "gitlens.views.createTag",
2908+
"title": "Create Tag...",
2909+
"category": "GitLens"
2910+
},
2911+
{
2912+
"command": "gitlens.views.deleteTag",
2913+
"title": "Delete Tag...",
28992914
"category": "GitLens"
29002915
},
29012916
{
@@ -2920,12 +2935,12 @@
29202935
},
29212936
{
29222937
"command": "gitlens.views.reset",
2923-
"title": "Reset to Commit",
2938+
"title": "Reset to Commit...",
29242939
"category": "GitLens"
29252940
},
29262941
{
29272942
"command": "gitlens.views.revert",
2928-
"title": "Revert Commit",
2943+
"title": "Revert Commit...",
29292944
"category": "GitLens"
29302945
},
29312946
{
@@ -2938,16 +2953,6 @@
29382953
"title": "Remove Remote (via Terminal)",
29392954
"category": "GitLens"
29402955
},
2941-
{
2942-
"command": "gitlens.views.terminalCreateTag",
2943-
"title": "Create Tag (via Terminal)...",
2944-
"category": "GitLens"
2945-
},
2946-
{
2947-
"command": "gitlens.views.terminalDeleteTag",
2948-
"title": "Delete Tag (via Terminal)",
2949-
"category": "GitLens"
2950-
},
29512956
{
29522957
"command": "gitlens.views.repositories.refresh",
29532958
"title": "Refresh",
@@ -3850,11 +3855,15 @@
38503855
"when": "false"
38513856
},
38523857
{
3853-
"command": "gitlens.views.terminalCreateBranch",
3858+
"command": "gitlens.views.createBranch",
3859+
"when": "false"
3860+
},
3861+
{
3862+
"command": "gitlens.views.deleteBranch",
38543863
"when": "false"
38553864
},
38563865
{
3857-
"command": "gitlens.views.terminalDeleteBranch",
3866+
"command": "gitlens.views.renameBranch",
38583867
"when": "false"
38593868
},
38603869
{
@@ -3894,11 +3903,11 @@
38943903
"when": "false"
38953904
},
38963905
{
3897-
"command": "gitlens.views.terminalCreateTag",
3906+
"command": "gitlens.views.createTag",
38983907
"when": "false"
38993908
},
39003909
{
3901-
"command": "gitlens.views.terminalDeleteTag",
3910+
"command": "gitlens.views.deleteTag",
39023911
"when": "false"
39033912
},
39043913
{
@@ -4678,6 +4687,26 @@
46784687
"when": "!gitlens:readonly && viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+current\\b)(?=.*?\\b\\+tracking\\b)/",
46794688
"group": "1_gitlens_actions@4"
46804689
},
4690+
{
4691+
"command": "gitlens.views.deleteBranch",
4692+
"when": "!gitlens:readonly && viewItem =~ /gitlens:branch\\b(?!.*?\\b\\+current\\b)/",
4693+
"group": "1_gitlens_actions@5"
4694+
},
4695+
{
4696+
"command": "gitlens.views.renameBranch",
4697+
"when": "!gitlens:readonly && viewItem =~ /gitlens:branch\\b/",
4698+
"group": "1_gitlens_actions@6"
4699+
},
4700+
{
4701+
"command": "gitlens.views.createBranch",
4702+
"when": "!gitlens:readonly && viewItem =~ /gitlens:branch\\b/",
4703+
"group": "1_gitlens_actions@7"
4704+
},
4705+
{
4706+
"command": "gitlens.views.createTag",
4707+
"when": "!gitlens:readonly && viewItem =~ /gitlens:branch\\b/",
4708+
"group": "1_gitlens_actions@8"
4709+
},
46814710
{
46824711
"command": "gitlens.views.openDirectoryDiffWithWorking",
46834712
"when": "viewItem =~ /gitlens:(branch|tag)\\b/",
@@ -4728,21 +4757,6 @@
47284757
"when": "viewItem =~ /gitlens:branch\\b(?=.*?\\b\\+(tracking|remote)\\b)/",
47294758
"group": "5_gitlens_open@1"
47304759
},
4731-
{
4732-
"command": "gitlens.views.terminalCreateBranch",
4733-
"when": "!gitlens:readonly && viewItem =~ /gitlens:(branch|commit|tag)\\b/",
4734-
"group": "6_gitlens_terminal@2"
4735-
},
4736-
{
4737-
"command": "gitlens.views.terminalDeleteBranch",
4738-
"when": "!gitlens:readonly && viewItem =~ /gitlens:branch\\b(?!.*?\\b\\+current\\b)/",
4739-
"group": "6_gitlens_terminal@3"
4740-
},
4741-
{
4742-
"command": "gitlens.views.terminalCreateTag",
4743-
"when": "!gitlens:readonly && viewItem =~ /gitlens:(branch|commit)\\b/",
4744-
"group": "6_gitlens_terminal@4"
4745-
},
47464760
{
47474761
"command": "gitlens.views.star",
47484762
"when": "viewItem =~ /gitlens:branch\\b(?!.*?\\b\\+starred\\b)/",
@@ -4829,6 +4843,16 @@
48294843
"when": "!gitlens:readonly && viewItem =~ /gitlens:commit\\b/",
48304844
"group": "1_gitlens_actions@5"
48314845
},
4846+
{
4847+
"command": "gitlens.views.createBranch",
4848+
"when": "!gitlens:readonly && viewItem =~ /gitlens:commit\\b/",
4849+
"group": "1_gitlens_actions_1@1"
4850+
},
4851+
{
4852+
"command": "gitlens.views.createTag",
4853+
"when": "!gitlens:readonly && viewItem =~ /gitlens:commit\\b/",
4854+
"group": "1_gitlens_actions_1@2"
4855+
},
48324856
{
48334857
"command": "gitlens.views.openChangedFileDiffs",
48344858
"when": "viewItem =~ /gitlens:(commit|stash|results:files)\\b/",
@@ -5366,9 +5390,14 @@
53665390
"group": "1_gitlens_actions@1"
53675391
},
53685392
{
5369-
"command": "gitlens.views.terminalDeleteTag",
5393+
"command": "gitlens.views.deleteTag",
53705394
"when": "!gitlens:readonly && viewItem == gitlens:tag",
5371-
"group": "6_gitlens_terminal@1"
5395+
"group": "1_gitlens_actions@2"
5396+
},
5397+
{
5398+
"command": "gitlens.views.createBranch",
5399+
"when": "!gitlens:readonly && viewItem =~ /gitlens:tag\\b/",
5400+
"group": "1_gitlens_actions@3"
53725401
},
53735402
{
53745403
"command": "gitlens.views.stageDirectory",

0 commit comments

Comments
 (0)