mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-26 05:07:35 +00:00
Merge commit 'refs/pull/52527/head' of github.com:Microsoft/vscode into pr/52527
This commit is contained in:
@@ -1051,6 +1051,12 @@
|
||||
"description": "%config.showProgress%",
|
||||
"default": true,
|
||||
"scope": "resource"
|
||||
},
|
||||
"git.syncRebase": {
|
||||
"type": "boolean",
|
||||
"scope": "resource",
|
||||
"default": false,
|
||||
"description": "%config.syncRebase%"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
"config.alwaysSignOff": "Controls the signoff flag for all commits.",
|
||||
"config.ignoredRepositories": "List of git repositories to ignore.",
|
||||
"config.showProgress": "Controls whether git actions should show progress.",
|
||||
"config.syncRebase": "Synchronize changes using rebase.",
|
||||
"colors.modified": "Color for modified resources.",
|
||||
"colors.deleted": "Color for deleted resources.",
|
||||
"colors.untracked": "Color for untracked resources.",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import { Disposable, Command, EventEmitter, Event } from 'vscode';
|
||||
import { Disposable, Command, EventEmitter, Event, workspace } from 'vscode';
|
||||
import { Repository, Operation } from './repository';
|
||||
import { anyEvent, dispose } from './util';
|
||||
import * as nls from 'vscode-nls';
|
||||
@@ -100,10 +100,18 @@ class SyncStatusBar {
|
||||
|
||||
if (HEAD && HEAD.name && HEAD.commit) {
|
||||
if (HEAD.upstream) {
|
||||
const config = workspace.getConfiguration('git');
|
||||
const gitSyncRebase = config.get<string>('syncRebase');
|
||||
|
||||
if (HEAD.ahead || HEAD.behind) {
|
||||
text += this.repository.syncLabel;
|
||||
}
|
||||
command = 'git.sync';
|
||||
|
||||
if (gitSyncRebase) {
|
||||
command = 'git.syncRebase';
|
||||
} else {
|
||||
command = 'git.sync';
|
||||
}
|
||||
tooltip = localize('sync changes', "Synchronize Changes");
|
||||
} else {
|
||||
icon = '$(cloud-upload)';
|
||||
|
||||
Reference in New Issue
Block a user