mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 17:22:45 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
@@ -1947,8 +1947,7 @@ export class CommandCenter {
|
||||
});
|
||||
|
||||
const name = inputTagName.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$/g, '-');
|
||||
const message = inputMessage || name;
|
||||
await repository.tag(name, message);
|
||||
await repository.tag(name, inputMessage);
|
||||
}
|
||||
|
||||
@command('git.deleteTag', { repository: true })
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
import { window, workspace, Uri, Disposable, Event, EventEmitter, FileDecoration, FileDecorationProvider, ThemeColor } from 'vscode';
|
||||
import * as path from 'path';
|
||||
import { Repository, GitResourceGroup } from './repository';
|
||||
|
||||
@@ -98,4 +98,4 @@ export function debounce(delay: number): Function {
|
||||
this[timerKey] = setTimeout(() => fn.apply(this, args), delay);
|
||||
};
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1969,7 +1969,7 @@ export class Repository {
|
||||
remote.pushUrl = url;
|
||||
}
|
||||
|
||||
// https://github.com/Microsoft/vscode/issues/45271
|
||||
// https://github.com/microsoft/vscode/issues/45271
|
||||
remote.isReadOnly = remote.pushUrl === undefined || remote.pushUrl === 'no_push';
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { ExtensionContext, workspace, window, Disposable, commands, Uri, OutputChannel } from 'vscode';
|
||||
import { findGit, Git, IGit } from './git';
|
||||
import { ExtensionContext, workspace, window, Disposable, commands, OutputChannel } from 'vscode';
|
||||
import { findGit, Git } from './git';
|
||||
import { Model } from './model';
|
||||
import { CommandCenter } from './commands';
|
||||
import { GitFileSystemProvider } from './fileSystemProvider';
|
||||
@@ -18,7 +18,7 @@ import TelemetryReporter from 'vscode-extension-telemetry';
|
||||
import { GitExtension } from './api/git';
|
||||
import { GitProtocolHandler } from './protocolHandler';
|
||||
import { GitExtensionImpl } from './api/extension';
|
||||
// import * as path from 'path';
|
||||
// import * as path from 'path'; {{SQL CARBON EDIT}}
|
||||
// import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import { GitTimelineProvider } from './timelineProvider';
|
||||
@@ -191,6 +191,7 @@ export async function activate(context: ExtensionContext): Promise<GitExtension>
|
||||
return result;
|
||||
}
|
||||
|
||||
/* {{SQL CARBON EDIT}}
|
||||
async function checkGitv1(info: IGit): Promise<void> {
|
||||
const config = workspace.getConfiguration('git');
|
||||
const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
|
||||
@@ -246,11 +247,10 @@ async function checkGitWindows(info: IGit): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-expect-error
|
||||
async function checkGitVersion(info: IGit): Promise<void> {
|
||||
await checkGitv1(info);
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
await checkGitWindows(info);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
@@ -268,7 +268,7 @@ export class Model implements IRemoteSourceProviderRegistry, IPushErrorHandlerRe
|
||||
|
||||
// This can happen whenever `path` has the wrong case sensitivity in
|
||||
// case insensitive file systems
|
||||
// https://github.com/Microsoft/vscode/issues/33498
|
||||
// https://github.com/microsoft/vscode/issues/33498
|
||||
const repositoryRoot = Uri.file(rawRoot).fsPath;
|
||||
|
||||
if (this.getRepository(repositoryRoot)) {
|
||||
|
||||
@@ -18,7 +18,7 @@ export function applyLineChanges(original: TextDocument, modified: TextDocument,
|
||||
|
||||
// if this is a deletion at the very end of the document,then we need to account
|
||||
// for a newline at the end of the last line which may have been deleted
|
||||
// https://github.com/Microsoft/vscode/issues/59670
|
||||
// https://github.com/microsoft/vscode/issues/59670
|
||||
if (isDeletion && diff.originalEndLineNumber === original.lineCount) {
|
||||
endLine -= 1;
|
||||
endCharacter = original.lineAt(endLine).range.end.character;
|
||||
|
||||
@@ -12,19 +12,19 @@ suite('git', () => {
|
||||
suite('GitStatusParser', () => {
|
||||
test('empty parser', () => {
|
||||
const parser = new GitStatusParser();
|
||||
assert.deepEqual(parser.status, []);
|
||||
assert.deepStrictEqual(parser.status, []);
|
||||
});
|
||||
|
||||
test('empty parser 2', () => {
|
||||
const parser = new GitStatusParser();
|
||||
parser.update('');
|
||||
assert.deepEqual(parser.status, []);
|
||||
assert.deepStrictEqual(parser.status, []);
|
||||
});
|
||||
|
||||
test('simple', () => {
|
||||
const parser = new GitStatusParser();
|
||||
parser.update('?? file.txt\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: undefined, x: '?', y: '?' }
|
||||
]);
|
||||
});
|
||||
@@ -34,7 +34,7 @@ suite('git', () => {
|
||||
parser.update('?? file.txt\0');
|
||||
parser.update('?? file2.txt\0');
|
||||
parser.update('?? file3.txt\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -51,7 +51,7 @@ suite('git', () => {
|
||||
parser.update('');
|
||||
parser.update('?? file3.txt\0');
|
||||
parser.update('');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -61,7 +61,7 @@ suite('git', () => {
|
||||
test('combined', () => {
|
||||
const parser = new GitStatusParser();
|
||||
parser.update('?? file.txt\0?? file2.txt\0?? file3.txt\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -72,7 +72,7 @@ suite('git', () => {
|
||||
const parser = new GitStatusParser();
|
||||
parser.update('?? file.txt\0?? file2');
|
||||
parser.update('.txt\0?? file3.txt\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -83,7 +83,7 @@ suite('git', () => {
|
||||
const parser = new GitStatusParser();
|
||||
parser.update('?? file.txt');
|
||||
parser.update('\0?? file2.txt\0?? file3.txt\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -94,7 +94,7 @@ suite('git', () => {
|
||||
const parser = new GitStatusParser();
|
||||
parser.update('?? file.txt\0?? file2.txt\0?? file3.txt');
|
||||
parser.update('\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -104,7 +104,7 @@ suite('git', () => {
|
||||
test('rename', () => {
|
||||
const parser = new GitStatusParser();
|
||||
parser.update('R newfile.txt\0file.txt\0?? file2.txt\0?? file3.txt\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' },
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -115,7 +115,7 @@ suite('git', () => {
|
||||
const parser = new GitStatusParser();
|
||||
parser.update('R newfile.txt\0fil');
|
||||
parser.update('e.txt\0?? file2.txt\0?? file3.txt\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' },
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -127,7 +127,7 @@ suite('git', () => {
|
||||
parser.update('?? file2.txt\0R new');
|
||||
parser.update('file.txt\0fil');
|
||||
parser.update('e.txt\0?? file3.txt\0');
|
||||
assert.deepEqual(parser.status, [
|
||||
assert.deepStrictEqual(parser.status, [
|
||||
{ path: 'file2.txt', rename: undefined, x: '?', y: '?' },
|
||||
{ path: 'file.txt', rename: 'newfile.txt', x: 'R', y: ' ' },
|
||||
{ path: 'file3.txt', rename: undefined, x: '?', y: '?' }
|
||||
@@ -137,7 +137,7 @@ suite('git', () => {
|
||||
|
||||
suite('parseGitmodules', () => {
|
||||
test('empty', () => {
|
||||
assert.deepEqual(parseGitmodules(''), []);
|
||||
assert.deepStrictEqual(parseGitmodules(''), []);
|
||||
});
|
||||
|
||||
test('sample', () => {
|
||||
@@ -146,7 +146,7 @@ suite('git', () => {
|
||||
url = https://github.com/gabime/spdlog.git
|
||||
`;
|
||||
|
||||
assert.deepEqual(parseGitmodules(sample), [
|
||||
assert.deepStrictEqual(parseGitmodules(sample), [
|
||||
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
|
||||
]);
|
||||
});
|
||||
@@ -166,7 +166,7 @@ suite('git', () => {
|
||||
url = https://github.com/gabime/spdlog4.git
|
||||
`;
|
||||
|
||||
assert.deepEqual(parseGitmodules(sample), [
|
||||
assert.deepStrictEqual(parseGitmodules(sample), [
|
||||
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' },
|
||||
{ name: 'deps/spdlog2', path: 'deps/spdlog2', url: 'https://github.com/gabime/spdlog.git' },
|
||||
{ name: 'deps/spdlog3', path: 'deps/spdlog3', url: 'https://github.com/gabime/spdlog.git' },
|
||||
@@ -180,7 +180,7 @@ suite('git', () => {
|
||||
url = https://github.com/gabime/spdlog.git
|
||||
`;
|
||||
|
||||
assert.deepEqual(parseGitmodules(sample), [
|
||||
assert.deepStrictEqual(parseGitmodules(sample), [
|
||||
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
|
||||
]);
|
||||
});
|
||||
@@ -191,7 +191,7 @@ suite('git', () => {
|
||||
url=https://github.com/gabime/spdlog.git
|
||||
`;
|
||||
|
||||
assert.deepEqual(parseGitmodules(sample), [
|
||||
assert.deepStrictEqual(parseGitmodules(sample), [
|
||||
{ name: 'deps/spdlog', path: 'deps/spdlog', url: 'https://github.com/gabime/spdlog.git' }
|
||||
]);
|
||||
});
|
||||
@@ -207,7 +207,7 @@ john.doe@mail.com
|
||||
8e5a374372b8393906c7e380dbb09349c5385554
|
||||
This is a commit message.\x00`;
|
||||
|
||||
assert.deepEqual(parseGitCommits(GIT_OUTPUT_SINGLE_PARENT), [{
|
||||
assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_SINGLE_PARENT), [{
|
||||
hash: '52c293a05038d865604c2284aa8698bd087915a1',
|
||||
message: 'This is a commit message.',
|
||||
parents: ['8e5a374372b8393906c7e380dbb09349c5385554'],
|
||||
@@ -227,7 +227,7 @@ john.doe@mail.com
|
||||
8e5a374372b8393906c7e380dbb09349c5385554 df27d8c75b129ab9b178b386077da2822101b217
|
||||
This is a commit message.\x00`;
|
||||
|
||||
assert.deepEqual(parseGitCommits(GIT_OUTPUT_MULTIPLE_PARENTS), [{
|
||||
assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_MULTIPLE_PARENTS), [{
|
||||
hash: '52c293a05038d865604c2284aa8698bd087915a1',
|
||||
message: 'This is a commit message.',
|
||||
parents: ['8e5a374372b8393906c7e380dbb09349c5385554', 'df27d8c75b129ab9b178b386077da2822101b217'],
|
||||
@@ -247,7 +247,7 @@ john.doe@mail.com
|
||||
|
||||
This is a commit message.\x00`;
|
||||
|
||||
assert.deepEqual(parseGitCommits(GIT_OUTPUT_NO_PARENTS), [{
|
||||
assert.deepStrictEqual(parseGitCommits(GIT_OUTPUT_NO_PARENTS), [{
|
||||
hash: '52c293a05038d865604c2284aa8698bd087915a1',
|
||||
message: 'This is a commit message.',
|
||||
parents: [],
|
||||
@@ -275,7 +275,7 @@ This is a commit message.\x00`;
|
||||
|
||||
const output = parseLsTree(input);
|
||||
|
||||
assert.deepEqual(output, [
|
||||
assert.deepStrictEqual(output, [
|
||||
{ mode: '040000', type: 'tree', object: '0274a81f8ee9ca3669295dc40f510bd2021d0043', size: '-', file: '.vscode' },
|
||||
{ mode: '100644', type: 'blob', object: '1d487c1817262e4f20efbfa1d04c18f51b0046f6', size: '491570', file: 'Screen Shot 2018-06-01 at 14.48.05.png' },
|
||||
{ mode: '100644', type: 'blob', object: '686c16e4f019b734655a2576ce8b98749a9ffdb9', size: '764420', file: 'Screen Shot 2018-06-07 at 20.04.59.png' },
|
||||
@@ -307,7 +307,7 @@ This is a commit message.\x00`;
|
||||
|
||||
const output = parseLsFiles(input);
|
||||
|
||||
assert.deepEqual(output, [
|
||||
assert.deepStrictEqual(output, [
|
||||
{ mode: '100644', object: '7a73a41bfdf76d6f793007240d80983a52f15f97', stage: '0', file: '.vscode/settings.json' },
|
||||
{ mode: '100644', object: '1d487c1817262e4f20efbfa1d04c18f51b0046f6', stage: '0', file: 'Screen Shot 2018-06-01 at 14.48.05.png' },
|
||||
{ mode: '100644', object: '686c16e4f019b734655a2576ce8b98749a9ffdb9', stage: '0', file: 'Screen Shot 2018-06-07 at 20.04.59.png' },
|
||||
@@ -325,72 +325,72 @@ This is a commit message.\x00`;
|
||||
|
||||
suite('splitInChunks', () => {
|
||||
test('unit tests', function () {
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 6)],
|
||||
[['hello'], ['there'], ['cool'], ['stuff']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 10)],
|
||||
[['hello', 'there'], ['cool', 'stuff']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 12)],
|
||||
[['hello', 'there'], ['cool', 'stuff']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 14)],
|
||||
[['hello', 'there', 'cool'], ['stuff']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['hello', 'there', 'cool', 'stuff'], 2000)],
|
||||
[['hello', 'there', 'cool', 'stuff']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 1)],
|
||||
[['0'], ['01'], ['012'], ['0'], ['01'], ['012'], ['0'], ['01'], ['012']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 2)],
|
||||
[['0'], ['01'], ['012'], ['0'], ['01'], ['012'], ['0'], ['01'], ['012']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 3)],
|
||||
[['0', '01'], ['012'], ['0', '01'], ['012'], ['0', '01'], ['012']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 4)],
|
||||
[['0', '01'], ['012', '0'], ['01'], ['012', '0'], ['01'], ['012']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 5)],
|
||||
[['0', '01'], ['012', '0'], ['01', '012'], ['0', '01'], ['012']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 6)],
|
||||
[['0', '01', '012'], ['0', '01', '012'], ['0', '01', '012']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 7)],
|
||||
[['0', '01', '012', '0'], ['01', '012', '0'], ['01', '012']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 8)],
|
||||
[['0', '01', '012', '0'], ['01', '012', '0', '01'], ['012']]
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
[...splitInChunks(['0', '01', '012', '0', '01', '012', '0', '01', '012'], 9)],
|
||||
[['0', '01', '012', '0', '01'], ['012', '0', '01', '012']]
|
||||
);
|
||||
|
||||
@@ -59,8 +59,8 @@ suite('git smoke test', function () {
|
||||
await eventToPromise(git.onDidOpenRepository);
|
||||
}
|
||||
|
||||
assert.equal(git.repositories.length, 1);
|
||||
assert.equal(fs.realpathSync(git.repositories[0].rootUri.fsPath), cwd);
|
||||
assert.strictEqual(git.repositories.length, 1);
|
||||
assert.strictEqual(fs.realpathSync(git.repositories[0].rootUri.fsPath), cwd);
|
||||
|
||||
repository = git.repositories[0];
|
||||
});
|
||||
@@ -72,7 +72,7 @@ suite('git smoke test', function () {
|
||||
await type(appjs, ' world');
|
||||
await appjs.save();
|
||||
await repository.status();
|
||||
assert.equal(repository.state.workingTreeChanges.length, 1);
|
||||
assert.strictEqual(repository.state.workingTreeChanges.length, 1);
|
||||
repository.state.workingTreeChanges.some(r => r.uri.path === appjs.uri.path && r.status === Status.MODIFIED);
|
||||
|
||||
fs.writeFileSync(file('newfile.txt'), '');
|
||||
@@ -80,7 +80,7 @@ suite('git smoke test', function () {
|
||||
await type(newfile, 'hey there');
|
||||
await newfile.save();
|
||||
await repository.status();
|
||||
assert.equal(repository.state.workingTreeChanges.length, 2);
|
||||
assert.strictEqual(repository.state.workingTreeChanges.length, 2);
|
||||
repository.state.workingTreeChanges.some(r => r.uri.path === appjs.uri.path && r.status === Status.MODIFIED);
|
||||
repository.state.workingTreeChanges.some(r => r.uri.path === newfile.uri.path && r.status === Status.UNTRACKED);
|
||||
});
|
||||
@@ -90,7 +90,7 @@ suite('git smoke test', function () {
|
||||
await commands.executeCommand('git.openChange', appjs);
|
||||
|
||||
assert(window.activeTextEditor);
|
||||
assert.equal(window.activeTextEditor!.document.uri.path, appjs.path);
|
||||
assert.strictEqual(window.activeTextEditor!.document.uri.path, appjs.path);
|
||||
|
||||
// TODO: how do we really know this is a diff editor?
|
||||
});
|
||||
@@ -100,13 +100,13 @@ suite('git smoke test', function () {
|
||||
const newfile = uri('newfile.txt');
|
||||
|
||||
await commands.executeCommand('git.stage', appjs);
|
||||
assert.equal(repository.state.workingTreeChanges.length, 1);
|
||||
assert.strictEqual(repository.state.workingTreeChanges.length, 1);
|
||||
repository.state.workingTreeChanges.some(r => r.uri.path === newfile.path && r.status === Status.UNTRACKED);
|
||||
assert.equal(repository.state.indexChanges.length, 1);
|
||||
assert.strictEqual(repository.state.indexChanges.length, 1);
|
||||
repository.state.indexChanges.some(r => r.uri.path === appjs.path && r.status === Status.INDEX_MODIFIED);
|
||||
|
||||
await commands.executeCommand('git.unstage', appjs);
|
||||
assert.equal(repository.state.workingTreeChanges.length, 2);
|
||||
assert.strictEqual(repository.state.workingTreeChanges.length, 2);
|
||||
repository.state.workingTreeChanges.some(r => r.uri.path === appjs.path && r.status === Status.MODIFIED);
|
||||
repository.state.workingTreeChanges.some(r => r.uri.path === newfile.path && r.status === Status.UNTRACKED);
|
||||
});
|
||||
@@ -117,14 +117,14 @@ suite('git smoke test', function () {
|
||||
|
||||
await commands.executeCommand('git.stage', appjs);
|
||||
await repository.commit('second commit');
|
||||
assert.equal(repository.state.workingTreeChanges.length, 1);
|
||||
assert.strictEqual(repository.state.workingTreeChanges.length, 1);
|
||||
repository.state.workingTreeChanges.some(r => r.uri.path === newfile.path && r.status === Status.UNTRACKED);
|
||||
assert.equal(repository.state.indexChanges.length, 0);
|
||||
assert.strictEqual(repository.state.indexChanges.length, 0);
|
||||
|
||||
await commands.executeCommand('git.stageAll', appjs);
|
||||
await repository.commit('third commit');
|
||||
assert.equal(repository.state.workingTreeChanges.length, 0);
|
||||
assert.equal(repository.state.indexChanges.length, 0);
|
||||
assert.strictEqual(repository.state.workingTreeChanges.length, 0);
|
||||
assert.strictEqual(repository.state.indexChanges.length, 0);
|
||||
});
|
||||
|
||||
test('rename/delete conflict', async function () {
|
||||
|
||||
@@ -353,7 +353,7 @@ export class Limiter<T> {
|
||||
}
|
||||
|
||||
queue(factory: () => Promise<T>): Promise<T> {
|
||||
return new Promise((c, e) => {
|
||||
return new Promise<T>((c, e) => {
|
||||
this.outstandingPromises.push({ factory, c, e });
|
||||
this.consume();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user