Skip to content

Commit fa1deaa

Browse files
committed
Merge commit 'refs/pull/52527/head' of github.com:Microsoft/vscode into pr/52527
2 parents 7ffa921 + 5c02579 commit fa1deaa

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

extensions/git/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,12 @@
10511051
"description": "%config.showProgress%",
10521052
"default": true,
10531053
"scope": "resource"
1054+
},
1055+
"git.syncRebase": {
1056+
"type": "boolean",
1057+
"scope": "resource",
1058+
"default": false,
1059+
"description": "%config.syncRebase%"
10541060
}
10551061
}
10561062
},

extensions/git/package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"config.alwaysSignOff": "Controls the signoff flag for all commits.",
8989
"config.ignoredRepositories": "List of git repositories to ignore.",
9090
"config.showProgress": "Controls whether git actions should show progress.",
91+
"config.syncRebase": "Synchronize changes using rebase.",
9192
"colors.modified": "Color for modified resources.",
9293
"colors.deleted": "Color for deleted resources.",
9394
"colors.untracked": "Color for untracked resources.",

extensions/git/src/statusbar.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
'use strict';
77

8-
import { Disposable, Command, EventEmitter, Event } from 'vscode';
8+
import { Disposable, Command, EventEmitter, Event, workspace } from 'vscode';
99
import { Repository, Operation } from './repository';
1010
import { anyEvent, dispose } from './util';
1111
import * as nls from 'vscode-nls';
@@ -100,10 +100,18 @@ class SyncStatusBar {
100100

101101
if (HEAD && HEAD.name && HEAD.commit) {
102102
if (HEAD.upstream) {
103+
const config = workspace.getConfiguration('git');
104+
const gitSyncRebase = config.get<string>('syncRebase');
105+
103106
if (HEAD.ahead || HEAD.behind) {
104107
text += this.repository.syncLabel;
105108
}
106-
command = 'git.sync';
109+
110+
if (gitSyncRebase) {
111+
command = 'git.syncRebase';
112+
} else {
113+
command = 'git.sync';
114+
}
107115
tooltip = localize('sync changes', "Synchronize Changes");
108116
} else {
109117
icon = '$(cloud-upload)';

0 commit comments

Comments
 (0)