Skip to content

Commit

Permalink
Merge branch 'master' into fix-executable-bits
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar authored Oct 9, 2019
2 parents 1cc0b59 + 6032e84 commit dfee033
Show file tree
Hide file tree
Showing 103 changed files with 1,016 additions and 544 deletions.
3 changes: 2 additions & 1 deletion extensions/configuration-editing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"launch.json",
"tasks.json",
"keybindings.json",
"extensions.json"
"extensions.json",
"argv.json"
]
}
],
Expand Down
5 changes: 2 additions & 3 deletions extensions/csharp/language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
["[", "]"],
["(", ")"],
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "/*", "close": " */", "notIn": ["string"] }
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] }
],
"surroundingPairs": [
["{", "}"],
Expand All @@ -30,4 +29,4 @@
"end": "^\\s*#endregion\\b"
}
}
}
}
24 changes: 24 additions & 0 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@
"title": "%command.ignore%",
"category": "Git"
},
{
"command": "git.revealInExplorer",
"title": "%command.revealInExplorer%",
"category": "Git"
},
{
"command": "git.stashIncludeUntracked",
"title": "%command.stashIncludeUntracked%",
Expand Down Expand Up @@ -507,6 +512,10 @@
"command": "git.restoreCommitTemplate",
"when": "false"
},
{
"command": "git.revealInExplorer",
"when": "false"
},
{
"command": "git.undoCommit",
"when": "config.git.enabled && gitOpenRepositoryCount != 0"
Expand Down Expand Up @@ -913,6 +922,11 @@
"when": "scmProvider == git && scmResourceGroup == merge",
"group": "inline"
},
{
"command": "git.revealInExplorer",
"when": "scmProvider == git && scmResourceGroup == merge",
"group": "2_view"
},
{
"command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == merge && config.git.showInlineOpenFileAction && config.git.openDiffOnClick",
Expand Down Expand Up @@ -948,6 +962,11 @@
"when": "scmProvider == git && scmResourceGroup == index",
"group": "inline"
},
{
"command": "git.revealInExplorer",
"when": "scmProvider == git && scmResourceGroup == index",
"group": "2_view"
},
{
"command": "git.openFile2",
"when": "scmProvider == git && scmResourceGroup == index && config.git.showInlineOpenFileAction && config.git.openDiffOnClick",
Expand Down Expand Up @@ -1007,6 +1026,11 @@
"command": "git.ignore",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "1_modification@3"
},
{
"command": "git.revealInExplorer",
"when": "scmProvider == git && scmResourceGroup == workingTree",
"group": "2_view"
}
],
"editor/title": [
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 @@ -56,6 +56,7 @@
"command.publish": "Publish Branch",
"command.showOutput": "Show Git Output",
"command.ignore": "Add to .gitignore",
"command.revealInExplorer": "Reveal in Explorer",
"command.stashIncludeUntracked": "Stash (Include Untracked)",
"command.stash": "Stash",
"command.stashPop": "Pop Stash...",
Expand Down
29 changes: 26 additions & 3 deletions extensions/git/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1249,11 +1249,13 @@ export class CommandCenter {
promptToSaveFilesBeforeCommit = 'never';
}

const enableSmartCommit = config.get<boolean>('enableSmartCommit') === true;

if (promptToSaveFilesBeforeCommit !== 'never') {
let documents = workspace.textDocuments
.filter(d => !d.isUntitled && d.isDirty && isDescendant(repository.root, d.uri.fsPath));

if (promptToSaveFilesBeforeCommit === 'staged') {
if (promptToSaveFilesBeforeCommit === 'staged' || repository.indexGroup.resourceStates.length > 0) {
documents = documents
.filter(d => repository.indexGroup.resourceStates.some(s => s.resourceUri.path === d.uri.fsPath));
}
Expand All @@ -1275,7 +1277,6 @@ export class CommandCenter {
}
}

const enableSmartCommit = config.get<boolean>('enableSmartCommit') === true;
const enableCommitSigning = config.get<boolean>('enableCommitSigning') === true;
const noStagedChanges = repository.indexGroup.resourceStates.length === 0;
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0;
Expand Down Expand Up @@ -1370,9 +1371,18 @@ export class CommandCenter {
value = (await repository.getCommit(repository.HEAD.commit)).message;
}

const branchName = repository.headShortName;
let placeHolder: string;

if (branchName) {
placeHolder = localize('commitMessageWithHeadLabel2', "Message (commit on '{0}')", branchName);
} else {
placeHolder = localize('commit message', "Commit message");
}

return await window.showInputBox({
value,
placeHolder: localize('commit message', "Commit message"),
placeHolder,
prompt: localize('provide commit message', "Please provide a commit message"),
ignoreFocusOut: true
});
Expand Down Expand Up @@ -2069,6 +2079,19 @@ export class CommandCenter {
await this.runByRepository(resources, async (repository, resources) => repository.ignore(resources));
}

@command('git.revealInExplorer')
async revealInExplorer(resourceState: SourceControlResourceState): Promise<void> {
if (!resourceState) {
return;
}

if (!(resourceState.resourceUri instanceof Uri)) {
return;
}

await commands.executeCommand('revealInExplorer', resourceState.resourceUri);
}

private async _stash(repository: Repository, includeUntracked = false): Promise<void> {
const noUnstagedChanges = repository.workingTreeGroup.resourceStates.length === 0;
const noStagedChanges = repository.indexGroup.resourceStates.length === 0;
Expand Down
27 changes: 20 additions & 7 deletions extensions/git/src/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,23 @@ export class Repository implements Disposable {
return this._refs;
}

get headShortName(): string | undefined {
if (!this.HEAD) {
return;
}

const HEAD = this.HEAD;
const tag = this.refs.filter(iref => iref.type === RefType.Tag && iref.commit === HEAD.commit)[0];
const tagName = tag && tag.name;
const branchName = HEAD.name || tagName || HEAD.commit;

if (branchName === undefined) {
return;
}

return branchName.substr(0, 8);
}

private _remotes: Remote[] = [];
get remotes(): Remote[] {
return this._remotes;
Expand Down Expand Up @@ -1643,15 +1660,11 @@ export class Repository implements Disposable {
}

private updateInputBoxPlaceholder(): void {
const HEAD = this.HEAD;

if (HEAD) {
const tag = this.refs.filter(iref => iref.type === RefType.Tag && iref.commit === HEAD.commit)[0];
const tagName = tag && tag.name;
const head = HEAD.name || tagName || (HEAD.commit || '').substr(0, 8);
const branchName = this.headShortName;

if (branchName) {
// '{0}' will be replaced by the corresponding key-command later in the process, which is why it needs to stay.
this._sourceControl.inputBox.placeholder = localize('commitMessageWithHeadLabel', "Message ({0} to commit on '{1}')", "{0}", head);
this._sourceControl.inputBox.placeholder = localize('commitMessageWithHeadLabel', "Message ({0} to commit on '{1}')", "{0}", branchName);
} else {
this._sourceControl.inputBox.placeholder = localize('commitMessage', "Message ({0} to commit)");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function getDocumentRegions(languageService: LanguageService, document: T
}
importedScripts.push(value);
} else if (lastAttributeName === 'type' && lastTagName.toLowerCase() === 'script') {
if (/["'](module|(text|application)\/(java|ecma)script)["']/.test(scanner.getTokenText())) {
if (/["'](module|(text|application)\/(java|ecma)script|text\/babel)["']/.test(scanner.getTokenText())) {
languageIdFromType = 'javascript';
} else {
languageIdFromType = undefined;
Expand Down Expand Up @@ -228,4 +228,4 @@ function getAttributeLanguage(attributeName: string): string | null {
return null;
}
return match[1] ? 'css' : 'javascript';
}
}
3 changes: 1 addition & 2 deletions extensions/json/language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
{ "open": "[", "close": "]", "notIn": ["string"] },
{ "open": "(", "close": ")", "notIn": ["string"] },
{ "open": "'", "close": "'", "notIn": ["string"] },
{ "open": "/*", "close": "*/", "notIn": ["string"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "`", "close": "`", "notIn": ["string", "comment"] }
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ export class MarkdownPreview extends Disposable {
}

private async onDidClickPreviewLink(href: string) {
let [hrefPath, fragment] = href.split('#');
let [hrefPath, fragment] = decodeURIComponent(href).split('#');

// We perviously already resolve absolute paths.
// Now make sure we handle relative file paths
Expand Down
2 changes: 1 addition & 1 deletion extensions/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ the hover shown on a script or using the command `Run Selected Npm Script`.

### Others

The extension fetches data from https://registry.npmjs/org and https://registry.bower.io to provide auto-completion and information on hover features on npm dependencies.
The extension fetches data from https://registry.npmjs.org and https://registry.bower.io to provide auto-completion and information on hover features on npm dependencies.

## Settings

Expand Down
2 changes: 1 addition & 1 deletion extensions/npm/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"config.npm.exclude": "Configure glob patterns for folders that should be excluded from automatic script detection.",
"config.npm.enableScriptExplorer": "Enable an explorer view for npm scripts when there is no top-level 'package.json' file.",
"config.npm.scriptExplorerAction": "The default click action used in the scripts explorer: `open` or `run`, the default is `open`.",
"config.npm.fetchOnlinePackageInfo": "Fetch data from https://registry.npmjs/org and https://registry.bower.io to provide auto-completion and information on hover features on npm dependencies.",
"config.npm.fetchOnlinePackageInfo": "Fetch data from https://registry.npmjs.org and https://registry.bower.io to provide auto-completion and information on hover features on npm dependencies.",
"npm.parseError": "Npm task detection: failed to parse the file {0}",
"taskdef.script": "The npm script to customize.",
"taskdef.path": "The path to the folder of the package.json file that provides the script. Can be omitted.",
Expand Down
4 changes: 4 additions & 0 deletions extensions/rust/language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
["\"", "\""],
["'", "'"]
],
"indentationRules": {
"increaseIndentPattern": "^.*\\{[^}\"']*$|^.*\\([^\\)\"']*$",
"decreaseIndentPattern": "^\\s*(\\s*\\/[*].*[*]\\/\\s*)*[})]"
},
"folding": {
"markers": {
"start": "^\\s*//\\s*#?region\\b",
Expand Down
8 changes: 7 additions & 1 deletion extensions/shellscript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
"language": "shellscript",
"scopeName": "source.shell",
"path": "./syntaxes/shell-unix-bash.tmLanguage.json"
}]
}],
"configurationDefaults": {
"[shellscript]": {
"files.eol": "\n"
}
}

}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.40.0",
"distro": "7d62db65536347b7a7c21ae355071b55920c4d84",
"distro": "9627858bf882fef220a55f51257dca1491763dc1",
"author": {
"name": "Microsoft Corporation"
},
Expand Down Expand Up @@ -51,8 +51,8 @@
"vscode-ripgrep": "^1.5.7",
"vscode-sqlite3": "4.0.8",
"vscode-textmate": "^4.2.2",
"xterm": "4.1.0-beta8",
"xterm-addon-search": "0.2.0",
"xterm": "4.2.0-beta4",
"xterm-addon-search": "0.3.0-beta5",
"xterm-addon-web-links": "0.2.0",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
Expand Down Expand Up @@ -100,6 +100,7 @@
"gulp-tslint": "^8.1.3",
"gulp-untar": "^0.0.7",
"gulp-vinyl-zip": "^2.1.2",
"husky": "^0.13.1",
"innosetup": "5.6.1",
"is": "^3.1.0",
"istanbul-lib-coverage": "^2.0.5",
Expand Down
4 changes: 2 additions & 2 deletions remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"vscode-proxy-agent": "0.4.0",
"vscode-ripgrep": "^1.5.7",
"vscode-textmate": "^4.2.2",
"xterm": "4.1.0-beta8",
"xterm-addon-search": "0.2.0",
"xterm": "4.2.0-beta4",
"xterm-addon-search": "0.3.0-beta5",
"xterm-addon-web-links": "0.2.0",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
Expand Down
4 changes: 2 additions & 2 deletions remote/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"onigasm-umd": "^2.2.2",
"semver-umd": "^5.5.3",
"vscode-textmate": "^4.2.2",
"xterm": "4.1.0-beta8",
"xterm-addon-search": "0.2.0",
"xterm": "4.2.0-beta4",
"xterm-addon-search": "0.3.0-beta5",
"xterm-addon-web-links": "0.2.0"
}
}
16 changes: 8 additions & 8 deletions remote/web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ vscode-textmate@^4.2.2:
dependencies:
oniguruma "^7.2.0"

xterm-addon-search@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.2.0.tgz#46659c7c33f9fc268ad3e7e6c5824bb2fdb65852"
integrity sha512-C/v2VvFn3hb1qUgjJPo7LxzxNCLBgNJv8n6v/bH2NqPz32/PNUF+IHu0SFf1TaIH+pydUpKXCtob5a/UyZg/+Q==
xterm-addon-search@0.3.0-beta5:
version "0.3.0-beta5"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.3.0-beta5.tgz#fd53d33a77a0235018479c712be8c12f7c0d083a"
integrity sha512-3GkGc4hST35/4hzgnQPLLvQ29WH7MkZ0mUrBE/Vm1IQum7TnMvWPTkGemwM+wAl4tdBmynNccHJlFeQzaQtVUg==

[email protected]:
version "0.2.0"
resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.2.0.tgz#b408a0be46211d8d4a0bb5e701d8f3c2bd07d473"
integrity sha512-dq81c4Pzli2PgKVBgY2REte9sCVibR3df8AP3SEvCTM9uYFnUFxtxzMTplPnc7+rXabVhFdbU6x+rstIk8HNQg==

xterm@4.1.0-beta8:
version "4.1.0-beta8"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.1.0-beta8.tgz#c1ef323ba336d92f5b52302b66f672dfff75b3ef"
integrity sha512-6lf+XVv0qT285w49P92tSYoUB406jdbgdhnPKNzxCIGtGX8kcwK+pHZ8HncDwcEhmTmI4LZ/WXPGtOQJg+onwg==
xterm@4.2.0-beta4:
version "4.2.0-beta4"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.2.0-beta4.tgz#596577f94a1da372119d192363ea2b19d1f8b50c"
integrity sha512-BmkpxCpqdOJoNdIcddkRT8S65sGjgBbWI0uIJNSnzZvj81OKcraMSTmF/ODw0TF/MDLc33Fx9cpDx/D6lQgl8Q==
16 changes: 8 additions & 8 deletions remote/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -416,20 +416,20 @@ [email protected]:
resolved "https://registry.yarnpkg.com/vscode-windows-registry/-/vscode-windows-registry-1.0.2.tgz#b863e704a6a69c50b3098a55fbddbe595b0c124a"
integrity sha512-/CLLvuOSM2Vme2z6aNyB+4Omd7hDxpf4Thrt8ImxnXeQtxzel2bClJpFQvQqK/s4oaXlkBKS7LqVLeZM+uSVIA==

xterm-addon-search@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.2.0.tgz#46659c7c33f9fc268ad3e7e6c5824bb2fdb65852"
integrity sha512-C/v2VvFn3hb1qUgjJPo7LxzxNCLBgNJv8n6v/bH2NqPz32/PNUF+IHu0SFf1TaIH+pydUpKXCtob5a/UyZg/+Q==
xterm-addon-search@0.3.0-beta5:
version "0.3.0-beta5"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.3.0-beta5.tgz#fd53d33a77a0235018479c712be8c12f7c0d083a"
integrity sha512-3GkGc4hST35/4hzgnQPLLvQ29WH7MkZ0mUrBE/Vm1IQum7TnMvWPTkGemwM+wAl4tdBmynNccHJlFeQzaQtVUg==

[email protected]:
version "0.2.0"
resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.2.0.tgz#b408a0be46211d8d4a0bb5e701d8f3c2bd07d473"
integrity sha512-dq81c4Pzli2PgKVBgY2REte9sCVibR3df8AP3SEvCTM9uYFnUFxtxzMTplPnc7+rXabVhFdbU6x+rstIk8HNQg==

xterm@4.1.0-beta8:
version "4.1.0-beta8"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.1.0-beta8.tgz#c1ef323ba336d92f5b52302b66f672dfff75b3ef"
integrity sha512-6lf+XVv0qT285w49P92tSYoUB406jdbgdhnPKNzxCIGtGX8kcwK+pHZ8HncDwcEhmTmI4LZ/WXPGtOQJg+onwg==
xterm@4.2.0-beta4:
version "4.2.0-beta4"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.2.0-beta4.tgz#596577f94a1da372119d192363ea2b19d1f8b50c"
integrity sha512-BmkpxCpqdOJoNdIcddkRT8S65sGjgBbWI0uIJNSnzZvj81OKcraMSTmF/ODw0TF/MDLc33Fx9cpDx/D6lQgl8Q==

yauzl@^2.9.2:
version "2.10.0"
Expand Down
2 changes: 1 addition & 1 deletion resources/linux/bin/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [ ! -L $0 ]; then
# if path is not a symlink, find relatively
VSCODE_PATH="$(dirname $0)/.."
else
if which readlink >/dev/null; then
if command -v readlink >/dev/null; then
# if readlink exists, follow the symlink and find relatively
VSCODE_PATH="$(dirname $(readlink -f $0))/.."
else
Expand Down
Loading

0 comments on commit dfee033

Please sign in to comment.