Skip to content

Commit

Permalink
Merge commit 'refs/pull/81982/head' of github.com:microsoft/vscode in…
Browse files Browse the repository at this point in the history
…to pr/81982
  • Loading branch information
joaomoreno committed Apr 20, 2020
2 parents 95f26d2 + 1acd035 commit 968de61
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,12 @@
"default": "mixed",
"description": "%config.untrackedChanges%",
"scope": "resource"
},
"git.showCommitInput": {
"type": "boolean",
"scope": "resource",
"default": true,
"description": "%config.showCommitInput%"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions extensions/git/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
9 changes: 9 additions & 0 deletions extensions/git/src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean>('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;

Expand Down

0 comments on commit 968de61

Please sign in to comment.