Working Directory for a branch seems to be incorrect.

Aperta
#1,972 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp, git
Ambito
devtools

Direzione di ricerca

Non è indicato alcun file sorgente né alcun test. Riproduci prima lo scenario di work-tree elencato, quindi segui Repos.Branches e il valore di Working Directory del branch per confrontarlo con il percorso del Repository. Il lavoro è completato quando un branch associato a un work tree restituisce il percorso di quel work tree invece del percorso del repository, con copertura di regressione se il progetto dispone di una posizione di test applicabile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I think there is an error in the Working Directory for a branch, particularly if a branch is associated with a WorkTree.

It always shows the same path as the Repository. However if a branch is associated with a work tree, it's working directory is probably not the same as the repository.

  1. Create a work tree and an associated branch.
  2. Create the Repository in code (pointing to the Repositories path).
  3. Examine all the branches by iterating through Repos.Branches.
  4. The working directory of the new branch is pointing to the working directory of the Repository, not the path to the work tree.
Version of LibGit2Sharp (release number or SHA1)
<PackageReference Include="LibGit2Sharp" Version="0.26.2" />
Operating system(s) tested; .NET runtime tested

VS 2022, Win 11
net6.0-windows10.0.19041.0

I know how to get the correct path if you think it is a bug.

Lingua principale
C#
Stelle
3.5k
Fork
925
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di libgit2/libgit2sharp

Tutte le issue di libgit2/libgit2sharp

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.