mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Fix some typo
Update extensions/git/src/api/git.d.ts Fix another typo Fix some typo
This commit is contained in:
6
extensions/git/src/api/git.d.ts
vendored
6
extensions/git/src/api/git.d.ts
vendored
@@ -26,9 +26,9 @@ export interface Ref {
|
||||
readonly remote?: string;
|
||||
}
|
||||
|
||||
export interface Trackingship {
|
||||
export interface TrackingShip {
|
||||
readonly local: string;
|
||||
readonly upstarem: string;
|
||||
readonly upstream: string;
|
||||
}
|
||||
|
||||
export interface UpstreamRef {
|
||||
@@ -175,4 +175,4 @@ export const enum GitErrorCodes {
|
||||
WrongCase = 'WrongCase',
|
||||
CantLockRef = 'CantLockRef',
|
||||
CantRebaseMultipleBranches = 'CantRebaseMultipleBranches',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import * as filetype from 'file-type';
|
||||
import { assign, groupBy, denodeify, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent } from './util';
|
||||
import { CancellationToken } from 'vscode';
|
||||
import { detectEncoding } from './encoding';
|
||||
import { Ref, RefType, Branch, Remote, GitErrorCodes, Trackingship } from './api/git';
|
||||
import { Ref, RefType, Branch, Remote, GitErrorCodes, TrackingShip } from './api/git';
|
||||
|
||||
const readfile = denodeify<string, string | null, string>(fs.readFile);
|
||||
|
||||
@@ -1374,7 +1374,7 @@ export class Repository {
|
||||
}
|
||||
}
|
||||
|
||||
async GetTracking(upstreamBranch: string): Promise<Trackingship[]> {
|
||||
async GetTracking(upstreamBranch: string): Promise<TrackingShip[]> {
|
||||
const result = await this.run(['for-each-ref', '--format', '%(if)%(upstream:short)%(then)%(refname:short)->%(upstream:short) %(else)* %(end)', 'refs/heads']);
|
||||
return result.stdout.trim().split('\n')
|
||||
.map(line => line.trim())
|
||||
@@ -1383,10 +1383,10 @@ export class Repository {
|
||||
const splited = line.split('->');
|
||||
return {
|
||||
local: splited[0],
|
||||
upstarem: splited[1]
|
||||
} as Trackingship;
|
||||
upstream: splited[1]
|
||||
} as TrackingShip;
|
||||
})
|
||||
.filter(trackingShip => trackingShip.upstarem === upstreamBranch);
|
||||
.filter(trackingShip => trackingShip.upstream === upstreamBranch);
|
||||
}
|
||||
|
||||
async getRefs(): Promise<Ref[]> {
|
||||
|
||||
@@ -13,7 +13,7 @@ import * as path from 'path';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as fs from 'fs';
|
||||
import { StatusBarCommands } from './statusbar';
|
||||
import { Branch, Ref, Remote, RefType, GitErrorCodes, Trackingship } from './api/git';
|
||||
import { Branch, Ref, Remote, RefType, GitErrorCodes, TrackingShip } from './api/git';
|
||||
|
||||
const timeout = (millis: number) => new Promise(c => setTimeout(c, millis));
|
||||
|
||||
@@ -881,7 +881,7 @@ export class Repository implements Disposable {
|
||||
await this.run(Operation.CheckoutTracking, () => this.repository.checkout(treeish, [], { track: true }));
|
||||
}
|
||||
|
||||
async getTracking(treeish: string): Promise<Trackingship[]> {
|
||||
async getTracking(treeish: string): Promise<TrackingShip[]> {
|
||||
return await this.run(Operation.GetTracking, () => this.repository.GetTracking(treeish));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user