Kaynağa Gözat

Fixes #649 - missing remotes w/o proper urls

main
Eric Amodio 5 yıl önce
ebeveyn
işleme
d5f8abe206
3 değiştirilmiş dosya ile 12 ekleme ve 7 silme
  1. +1
    -0
      CHANGELOG.md
  2. +2
    -2
      src/git/parsers/remoteParser.ts
  3. +9
    -5
      src/views/nodes/remoteNode.ts

+ 1
- 0
CHANGELOG.md Dosyayı Görüntüle

@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#649](https://github.com/eamodio/vscode-gitlens/issues/649) - GitLens can't see the remote but git can
- Fixes [#798](https://github.com/eamodio/vscode-gitlens/issues/798) - git pull/fetch all repositories
- Fixes [#805](https://github.com/eamodio/vscode-gitlens/issues/805) - Version 9.9.1 breaks working tree comparison

+ 2
- 2
src/git/parsers/remoteParser.ts Dosyayı Görüntüle

@ -82,7 +82,7 @@ export class GitRemoteParser {
[scheme, domain, path] = this.parseGitUrl(url);
uniqueness = `${domain}/${path}`;
uniqueness = `${domain ? `${domain}/` : ''}${path}`;
remote = groups[uniqueness];
if (remote === undefined) {
const provider = providerFactory(domain, path);
@ -113,7 +113,7 @@ export class GitRemoteParser {
static parseGitUrl(url: string): [string, string, string] {
const match = urlRegex.exec(url);
if (match == null) return [emptyStr, emptyStr, emptyStr];
if (match == null) return [emptyStr, emptyStr, url];
return [
match[1] || match[3] || match[6],

+ 9
- 5
src/views/nodes/remoteNode.ts Dosyayı Görüntüle

@ -92,11 +92,15 @@ export class RemoteNode extends ViewNode {
`${this.remote.default ? `${GlyphChars.Check} ${GlyphChars.Space}` : ''}${this.remote.name}`,
TreeItemCollapsibleState.Collapsed
);
item.description = `${arrows}${GlyphChars.Space} ${
this.remote.provider !== undefined ? this.remote.provider.name : this.remote.domain
} ${GlyphChars.Space}${GlyphChars.Dot}${GlyphChars.Space} ${
this.remote.provider !== undefined ? this.remote.provider.displayPath : this.remote.path
}`;
item.description =
this.remote.provider !== undefined
? `${arrows}${GlyphChars.Space} ${this.remote.provider.name} ${GlyphChars.Space}${GlyphChars.Dot}${GlyphChars.Space} ${this.remote.provider.displayPath}`
: `${arrows}${GlyphChars.Space} ${
this.remote.domain
? `${this.remote.domain} ${GlyphChars.Space}${GlyphChars.Dot}${GlyphChars.Space} `
: ''
}${this.remote.path}`;
item.contextValue = ResourceType.Remote;
if (this.remote.default) {
item.contextValue += '+default';

Yükleniyor…
İptal
Kaydet