Adds workspace trust setting

This commit is contained in:
Eric Amodio 2021-04-19 11:53:51 -04:00
parent 86157f0d55
commit 6836261663
2 changed files with 7 additions and 1 deletions

View file

@ -26,6 +26,9 @@
"update-grammar": "node ./build/update-grammars.js",
"test": "node ../../node_modules/mocha/bin/mocha"
},
"workspaceTrust": {
"request": "never"
},
"contributes": {
"commands": [
{

View file

@ -1835,7 +1835,10 @@ export class Repository implements Disposable {
// noop
}
const sort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder') || 'alphabetically';
let sort = config.get<'alphabetically' | 'committerdate'>('branchSortOrder') || 'alphabetically';
if (sort !== 'alphabetically' && sort !== 'committerdate') {
sort = 'alphabetically';
}
const [refs, remotes, submodules, rebaseCommit] = await Promise.all([this.repository.getRefs({ sort }), this.repository.getRemotes(), this.repository.getSubmodules(), this.getRebaseCommit()]);
this._HEAD = HEAD;