Browse Source

Renames GitRemote.types to urls

main
Eric Amodio 4 years ago
parent
commit
af7a943718
5 changed files with 7 additions and 7 deletions
  1. +1
    -1
      src/git/models/remote.ts
  2. +1
    -1
      src/git/parsers/remoteParser.ts
  3. +1
    -1
      src/quickpicks/gitQuickPickItems.ts
  4. +1
    -1
      src/views/nodes/branchNode.ts
  5. +3
    -3
      src/views/nodes/remoteNode.ts

+ 1
- 1
src/git/models/remote.ts View File

@ -55,7 +55,7 @@ export class GitRemote
public readonly domain: string,
public readonly path: string,
public readonly provider: TProvider,
public readonly types: { type: GitRemoteType; url: string }[],
public readonly urls: { type: GitRemoteType; url: string }[],
) {}
get default() {

+ 1
- 1
src/git/parsers/remoteParser.ts View File

@ -103,7 +103,7 @@ export class GitRemoteParser {
groups[uniqueness] = remote;
} else {
// Stops excessive memory usage -- https://bugs.chromium.org/p/v8/issues/detail?id=2869
remote.types.push({ url: url, type: ` ${type}`.substr(1) as GitRemoteType });
remote.urls.push({ url: url, type: ` ${type}`.substr(1) as GitRemoteType });
}
} while (true);

+ 1
- 1
src/quickpicks/gitQuickPickItems.ts View File

@ -74,7 +74,7 @@ export namespace BranchQuickPickItem {
if (remote !== undefined) {
let left;
let right;
for (const { type } of remote.types) {
for (const { type } of remote.urls) {
if (type === GitRemoteType.Fetch) {
left = true;

+ 1
- 1
src/views/nodes/branchNode.ts View File

@ -241,7 +241,7 @@ export class BranchNode
if (remote != null) {
let left;
let right;
for (const { type } of remote.types) {
for (const { type } of remote.urls) {
if (type === GitRemoteType.Fetch) {
left = true;

+ 3
- 3
src/views/nodes/remoteNode.ts View File

@ -83,7 +83,7 @@ export class RemoteNode extends ViewNode {
let arrows;
let left;
let right;
for (const { type } of this.remote.types) {
for (const { type } of this.remote.urls) {
if (type === GitRemoteType.Fetch) {
left = true;
@ -147,8 +147,8 @@ export class RemoteNode extends ViewNode {
item.id = this.id;
for (const type of this.remote.types) {
item.tooltip += `\n${type.url} (${type.type})`;
for (const { type, url } of this.remote.urls) {
item.tooltip += `\n${url} (${type})`;
}
return item;

Loading…
Cancel
Save