Parcourir la source

Fixes missing `folder` prop on Repository

- Fixes issue when using folder tokens in `worktrees.defaultLocation`
main
Eric Amodio il y a 1 an
Parent
révision
1c77db5c0a
3 fichiers modifiés avec 4 ajouts et 5 suppressions
  1. +3
    -3
      src/env/node/git/localGitProvider.ts
  2. +0
    -1
      src/git/models/repository.ts
  3. +1
    -1
      src/plus/github/githubGitProvider.ts

+ 3
- 3
src/env/node/git/localGitProvider.ts Voir le fichier

@ -503,7 +503,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
this.container,
this.onRepositoryChanged.bind(this),
this.descriptor,
folder,
folder ?? workspace.getWorkspaceFolder(uri),
uri,
root,
suspended ?? !window.state.focused,
@ -514,7 +514,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
this.container,
this.onRepositoryChanged.bind(this),
this.descriptor,
folder,
folder ?? workspace.getWorkspaceFolder(canonicalUri),
canonicalUri,
root,
suspended ?? !window.state.focused,
@ -529,7 +529,7 @@ export class LocalGitProvider implements GitProvider, Disposable {
this.container,
this.onRepositoryChanged.bind(this),
this.descriptor,
folder,
folder ?? workspace.getWorkspaceFolder(uri),
uri,
root,
suspended ?? !window.state.focused,

+ 0
- 1
src/git/models/repository.ts Voir le fichier

@ -226,7 +226,6 @@ export class Repository implements Disposable {
suspended: boolean,
closed: boolean = false,
) {
folder = workspace.getWorkspaceFolder(uri) ?? folder;
if (folder != null) {
if (root) {
this.name = folder.name;

+ 1
- 1
src/plus/github/githubGitProvider.ts Voir le fichier

@ -261,7 +261,7 @@ export class GitHubGitProvider implements GitProvider, Disposable {
this.container,
this.onRepositoryChanged.bind(this),
this.descriptor,
folder,
folder ?? workspace.getWorkspaceFolder(uri),
uri,
root,
suspended ?? !window.state.focused,

Chargement…
Annuler
Enregistrer