Remove git-ui extension

This commit is contained in:
Christof Marti
2021-04-13 21:38:53 +02:00
parent a3444b1212
commit 40a6563f9b
14 changed files with 5 additions and 170 deletions
-1
View File
@@ -39,7 +39,6 @@ const compilations = [
'debug-server-ready/tsconfig.json',
'emmet/tsconfig.json',
'extension-editing/tsconfig.json',
'git-ui/tsconfig.json',
'git/tsconfig.json',
'github-authentication/tsconfig.json',
'github/tsconfig.json',
-1
View File
@@ -17,7 +17,6 @@ exports.dirs = [
'extensions/emmet',
'extensions/extension-editing',
'extensions/git',
'extensions/git-ui',
'extensions/github',
'extensions/github-authentication',
'extensions/grunt',
-8
View File
@@ -1,8 +0,0 @@
src/**
test/**
out/**
tsconfig.json
build/**
extension.webpack.config.js
cgmanifest.json
yarn.lock
-7
View File
@@ -1,7 +0,0 @@
# Git UI integration for Visual Studio Code
**Notice:** This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
## Features
See [Git support in VS Code](https://code.visualstudio.com/docs/editor/versioncontrol#_git-support) to learn about the features of this extension.
-4
View File
@@ -1,4 +0,0 @@
{
"registrations": [],
"version": 1
}
@@ -1,17 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
'use strict';
const withDefaults = require('../shared.webpack.config');
module.exports = withDefaults({
context: __dirname,
entry: {
main: './src/main.ts'
}
});
-35
View File
@@ -1,35 +0,0 @@
{
"name": "git-ui",
"displayName": "%displayName%",
"description": "%description%",
"publisher": "vscode",
"license": "MIT",
"version": "1.0.0",
"engines": {
"vscode": "^1.5.0"
},
"extensionKind": [
"ui"
],
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"enableProposedApi": true,
"categories": [
"Other"
],
"activationEvents": [
"onCommand:git.credential"
],
"main": "./out/main",
"icon": "resources/icons/git.png",
"scripts": {
"compile": "gulp compile-extension:git-ui",
"watch": "gulp watch-extension:git-ui"
},
"devDependencies": {
"@types/node": "^12.19.9"
},
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode.git"
}
}
-4
View File
@@ -1,4 +0,0 @@
{
"displayName": "Git UI",
"description": "Git SCM UI Integration"
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

-58
View File
@@ -1,58 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ExtensionContext, commands } from 'vscode';
import * as cp from 'child_process';
export async function deactivate(): Promise<any> {
}
export async function activate(context: ExtensionContext): Promise<void> {
context.subscriptions.push(commands.registerCommand('git.credential', async (_data: any) => {
return { stdout: '', stderr: '', code: 0 };
// try {
// const { stdout, stderr } = await exec(`git credential ${data.command}`, {
// stdin: data.stdin,
// env: Object.assign(process.env, { GIT_TERMINAL_PROMPT: '0' })
// });
// return { stdout, stderr, code: 0 };
// } catch ({ stdout, stderr, error }) {
// const code = error.code || 0;
// if (stderr.indexOf('terminal prompts disabled') !== -1) {
// stderr = '';
// }
// return { stdout, stderr, code };
// }
}));
}
export interface ExecResult {
error: Error | null;
stdout: string;
stderr: string;
}
export function exec(command: string, options: cp.ExecOptions & { stdin?: string } = {}) {
return new Promise<ExecResult>((resolve, reject) => {
const child = cp.exec(command, options, (error, stdout, stderr) => {
(error ? reject : resolve)({ error, stdout, stderr });
});
if (options.stdin) {
child.stdin!.write(options.stdin, (err: any) => {
if (err) {
reject(err);
return;
}
child.stdin!.end((err: any) => {
if (err) {
reject(err);
}
});
});
}
});
}
-8
View File
@@ -1,8 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/// <reference path='../../../../src/vs/vscode.d.ts'/>
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
/// <reference types='@types/node'/>
-13
View File
@@ -1,13 +0,0 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out",
"experimentalDecorators": true,
"typeRoots": [
"./node_modules/@types"
]
},
"include": [
"src/**/*"
]
}
-8
View File
@@ -1,8 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/node@^12.19.9":
version "12.19.9"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679"
integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q==
@@ -32,19 +32,18 @@ suite('vscode API - env', () => {
test('env.remoteName', function () {
const remoteName = env.remoteName;
const knownWorkspaceExtension = extensions.getExtension('vscode.git');
const knownUiExtension = extensions.getExtension('vscode.git-ui');
const knownUiAndWorkspaceExtension = extensions.getExtension('vscode.image-preview');
if (typeof remoteName === 'undefined') {
// not running in remote, so we expect both extensions
assert.ok(knownWorkspaceExtension);
assert.ok(knownUiExtension);
assert.equal(ExtensionKind.UI, knownUiExtension!.extensionKind);
assert.ok(knownUiAndWorkspaceExtension);
assert.equal(ExtensionKind.UI, knownUiAndWorkspaceExtension!.extensionKind);
} else if (typeof remoteName === 'string') {
// running in remote, so we only expect workspace extensions
assert.ok(knownWorkspaceExtension);
if (env.uiKind === UIKind.Desktop) {
assert.ok(!knownUiExtension); // we currently can only access extensions that run on same host
}
assert.ok(knownUiAndWorkspaceExtension);
assert.equal(ExtensionKind.Workspace, knownWorkspaceExtension!.extensionKind);
assert.equal(ExtensionKind.Workspace, knownUiAndWorkspaceExtension!.extensionKind);
} else {
assert.fail();
}