Skip to content

Commit 968de61

Browse files
committed
Merge commit 'refs/pull/81982/head' of github.com:microsoft/vscode into pr/81982
2 parents 95f26d2 + 1acd035 commit 968de61

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

extensions/git/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,6 +1663,12 @@
16631663
"default": "mixed",
16641664
"description": "%config.untrackedChanges%",
16651665
"scope": "resource"
1666+
},
1667+
"git.showCommitInput": {
1668+
"type": "boolean",
1669+
"scope": "resource",
1670+
"default": true,
1671+
"description": "%config.showCommitInput%"
16661672
}
16671673
}
16681674
},

extensions/git/package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
"config.untrackedChanges.mixed": "All changes, tracked and untracked, appear together and behave equally.",
144144
"config.untrackedChanges.separate": "Untracked changes appear separately in the Source Control view. They are also excluded from several actions.",
145145
"config.untrackedChanges.hidden": "Untracked changes are hidden and excluded from several actions.",
146+
"config.showCommitInput": "Controls whether to show the commit input in the Git source control panel.",
146147
"colors.added": "Color for added resources.",
147148
"colors.modified": "Color for modified resources.",
148149
"colors.deleted": "Color for deleted resources.",

extensions/git/src/repository.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,15 @@ export class Repository implements Disposable {
743743
const onConfigListenerForUntracked = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.untrackedChanges', root));
744744
onConfigListenerForUntracked(this.updateModelState, this, this.disposables);
745745

746+
const updateInputBoxVisibility = () => {
747+
const config = workspace.getConfiguration('git', root);
748+
this._sourceControl.inputBox.visible = config.get<boolean>('showCommitInput', true);
749+
};
750+
751+
const onConfigListenerForInputBoxVisibility = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.showCommitInput', root));
752+
onConfigListenerForInputBoxVisibility(updateInputBoxVisibility, this, this.disposables);
753+
updateInputBoxVisibility();
754+
746755
this.mergeGroup.hideWhenEmpty = true;
747756
this.untrackedGroup.hideWhenEmpty = true;
748757

0 commit comments

Comments
 (0)