提交 405e8537 编写于 作者: J Joao Moreno

💄

上级 fa1deaaa
......@@ -1052,11 +1052,11 @@
"default": true,
"scope": "resource"
},
"git.syncRebase": {
"git.rebaseWhenSync": {
"type": "boolean",
"scope": "resource",
"default": false,
"description": "%config.syncRebase%"
"description": "%config.rebaseWhenSync%"
}
}
},
......
......@@ -88,7 +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.",
"config.rebaseWhenSync": "Use rebase instead of merge when running the sync command.",
"colors.modified": "Color for modified resources.",
"colors.deleted": "Color for deleted resources.",
"colors.untracked": "Color for untracked resources.",
......
......@@ -100,18 +100,14 @@ 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;
}
if (gitSyncRebase) {
command = 'git.syncRebase';
} else {
command = 'git.sync';
}
const config = workspace.getConfiguration('git');
const rebaseWhenSync = config.get<string>('rebaseWhenSync');
command = rebaseWhenSync ? 'git.syncRebase' : 'git.sync';
tooltip = localize('sync changes', "Synchronize Changes");
} else {
icon = '$(cloud-upload)';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册