libgit2 / libgit2/libgit2sharp
Remotes are sometimes not returned for worktree
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 3.5k
- Fork
- 925
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Reproduction steps
- Create repository with remote and commit.
- Create branch and create a worktree from that branch.
- Copy the path to worktree and run the following code:
var worktreePath = "Here is your worktree path";
var repositoryPath = Repository.Discover(worktreePath);
var repo = new Repository(repositoryPath);
var before = repo.Network.Remotes.ToArray();
_ = repo.Head.RemoteName;
var after = repo.Network.Remotes.ToArray();
Expected behavior
Both before and after variable contain remote.
Actual behavior
The before variable contains remote, after is empty.
Version of LibGit2Sharp (release number or SHA1)
Latest master: 7f59d22c4fdb7b3d14511aca567e64eefaa43ab2
Operating system(s) tested; .NET runtime tested
Windows, .NET Framework 462 and .NET Core 2.1. I believe it doesn't matter.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia eseguendo la riproduzione C# segnalata sul master più recente, concentrandoti su Repository.Discover, repo.Network.Remotes e repo.Head.RemoteName con un worktree collegato. Traccia il motivo per cui l’accesso a Head.RemoteName modifica il risultato di remotes; il lavoro è completato quando il remote del repository è presente sia prima sia dopo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, git
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100