diff --git a/extensions/git/package.json b/extensions/git/package.json index 289aba571e95c..a29fc3db062c7 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -1663,6 +1663,12 @@ "default": "mixed", "description": "%config.untrackedChanges%", "scope": "resource" + }, + "git.showCommitInput": { + "type": "boolean", + "scope": "resource", + "default": true, + "description": "%config.showCommitInput%" } } }, diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 40941049166f1..2ea91658e9cb7 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -143,6 +143,7 @@ "config.untrackedChanges.mixed": "All changes, tracked and untracked, appear together and behave equally.", "config.untrackedChanges.separate": "Untracked changes appear separately in the Source Control view. They are also excluded from several actions.", "config.untrackedChanges.hidden": "Untracked changes are hidden and excluded from several actions.", + "config.showCommitInput": "Controls whether to show the commit input in the Git source control panel.", "colors.added": "Color for added resources.", "colors.modified": "Color for modified resources.", "colors.deleted": "Color for deleted resources.", diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 4f1d21796abaf..6a4ad7c1bfdf0 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -743,6 +743,15 @@ export class Repository implements Disposable { const onConfigListenerForUntracked = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.untrackedChanges', root)); onConfigListenerForUntracked(this.updateModelState, this, this.disposables); + const updateInputBoxVisibility = () => { + const config = workspace.getConfiguration('git', root); + this._sourceControl.inputBox.visible = config.get('showCommitInput', true); + }; + + const onConfigListenerForInputBoxVisibility = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.showCommitInput', root)); + onConfigListenerForInputBoxVisibility(updateInputBoxVisibility, this, this.disposables); + updateInputBoxVisibility(); + this.mergeGroup.hideWhenEmpty = true; this.untrackedGroup.hideWhenEmpty = true;