File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 75507550 "when" : " !gitlens:readonly && viewItem == gitlens:stash" ,
75517551 "group" : " 1_gitlens_actions@2"
75527552 },
7553+ {
7554+ "command" : " gitlens.views.createTag" ,
7555+ "when" : " !gitlens:readonly && viewItem =~ /gitlens:tags\\ b/" ,
7556+ "group" : " inline@1"
7557+ },
7558+ {
7559+ "command" : " gitlens.views.createTag" ,
7560+ "when" : " !gitlens:readonly && viewItem =~ /gitlens:tags\\ b/" ,
7561+ "group" : " 1_gitlens_actions@1"
7562+ },
75537563 {
75547564 "command" : " gitlens.views.switchToTag" ,
75557565 "when" : " !gitlens:readonly && viewItem =~ /gitlens:tag\\ b/" ,
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ export class TagsNode extends ViewNode<TagsView | RepositoriesView> {
2828 return TagsNode . getId ( this . repo . path ) ;
2929 }
3030
31+ get repoPath ( ) : string {
32+ return this . repo . path ;
33+ }
34+
3135 async getChildren ( ) : Promise < ViewNode [ ] > {
3236 if ( this . _children == null ) {
3337 const tags = await this . repo . getTags ( { sort : true } ) ;
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import {
4242 StashNode ,
4343 StatusFileNode ,
4444 TagNode ,
45+ TagsNode ,
4546 ViewNode ,
4647 ViewRefFileNode ,
4748 ViewRefNode ,
@@ -288,10 +289,8 @@ export class ViewCommands {
288289 }
289290
290291 @debug ( )
291- private createTag ( node ?: ViewRefNode ) {
292- if ( node != null && ! ( node instanceof ViewRefNode ) ) return Promise . resolve ( ) ;
293-
294- return GitActions . Tag . create ( node ?. repoPath , node ?. ref ) ;
292+ private createTag ( node ?: ViewRefNode | TagsNode ) {
293+ return GitActions . Tag . create ( node ?. repoPath , node instanceof ViewRefNode ? node ?. ref : undefined ) ;
295294 }
296295
297296 @debug ( )
You can’t perform that action at this time.
0 commit comments