Skip to content

Commit fb2a602

Browse files
committed
Adds branch upstream command to palette (#4498)
1 parent 162162b commit fb2a602

File tree

6 files changed

+19
-2
lines changed

6 files changed

+19
-2
lines changed

contributions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,10 @@
16241624
"label": "Git Rename Branch...",
16251625
"commandPalette": "!gitlens:disabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"
16261626
},
1627+
"gitlens.gitCommands.branch.upstream": {
1628+
"label": "Git Change Branch Upstream...",
1629+
"commandPalette": "!gitlens:disabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"
1630+
},
16271631
"gitlens.gitCommands.checkout": {
16281632
"label": "Git Checkout...",
16291633
"commandPalette": "!gitlens:disabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"

docs/telemetry-events.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6701,6 +6701,11 @@
67016701
"title": "Git Rename Branch...",
67026702
"category": "GitLens"
67036703
},
6704+
{
6705+
"command": "gitlens.gitCommands.branch.upstream",
6706+
"title": "Git Change Branch Upstream...",
6707+
"category": "GitLens"
6708+
},
67046709
{
67056710
"command": "gitlens.gitCommands.checkout",
67066711
"title": "Git Checkout...",
@@ -11207,6 +11212,10 @@
1120711212
"command": "gitlens.gitCommands.branch.rename",
1120811213
"when": "!gitlens:disabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"
1120911214
},
11215+
{
11216+
"command": "gitlens.gitCommands.branch.upstream",
11217+
"when": "!gitlens:disabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"
11218+
},
1121011219
{
1121111220
"command": "gitlens.gitCommands.checkout",
1121211221
"when": "!gitlens:disabled && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"

src/commands/git/branch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ export class BranchGitCommand extends QuickCommand {
812812
state.reference.upstream != null
813813
? {
814814
label: 'Unset Upstream',
815-
description: 'Remove any upstream tracking',
815+
description: 'Removes any upstream tracking',
816816
button: { icon: new ThemeIcon('discard'), tooltip: 'Unset Upstream' },
817817
}
818818
: undefined,

src/commands/gitWizard.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export class GitWizardCommand extends QuickWizardCommandBase {
5454
'gitlens.gitCommands.branch.delete',
5555
'gitlens.gitCommands.branch.prune',
5656
'gitlens.gitCommands.branch.rename',
57+
'gitlens.gitCommands.branch.upstream',
5758
'gitlens.gitCommands.checkout',
5859
'gitlens.gitCommands.cherryPick',
5960
'gitlens.gitCommands.history',
@@ -101,6 +102,8 @@ export class GitWizardCommand extends QuickWizardCommandBase {
101102
return this.execute({ command: 'branch', state: { subcommand: 'prune' } });
102103
case 'gitlens.gitCommands.branch.rename':
103104
return this.execute({ command: 'branch', state: { subcommand: 'rename' } });
105+
case 'gitlens.gitCommands.branch.upstream':
106+
return this.execute({ command: 'branch', state: { subcommand: 'upstream' } });
104107
case 'gitlens.gitCommands.cherryPick':
105108
return this.execute({ command: 'cherry-pick' });
106109
case 'gitlens.gitCommands.history':

src/constants.commands.generated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,7 @@ export type ContributedPaletteCommands =
714714
| 'gitlens.gitCommands.branch.delete'
715715
| 'gitlens.gitCommands.branch.prune'
716716
| 'gitlens.gitCommands.branch.rename'
717+
| 'gitlens.gitCommands.branch.upstream'
717718
| 'gitlens.gitCommands.checkout'
718719
| 'gitlens.gitCommands.cherryPick'
719720
| 'gitlens.gitCommands.history'

0 commit comments

Comments
 (0)