libgit2 / libgit2/libgit2sharp

Deleted tags show up in the list

Aberta
#1,875 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Linguagem predominante
C#
Estrelas
3.5k
Forks
925
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Reproduction steps
  1. Add a new tag in github repository online (www.github.com).
  2. Run .Net core Controller.
  3. Added tag show up in the Api.
  4. Delete a tag in github repository online.
  5. Run controller and API.
  6. Deleted tag show up in API Controller.
  7. _repository = new Repository("localfolderpath");
     var network = _repository.Network.Remotes.First();
     var refSpecs = new List<string>() { network.FetchRefSpecs.First().Specification };
     var fetchOptions = new FetchOptions { TagFetchMode = TagFetchMode.All };
     fetchOptions.CredentialsProvider = (_url, _user, _cred) => new DefaultCredentials();
     fetchOptions.CredentialsProvider += (_url, _user, _cred) => _userNamePasswordCredentials;
    
     Commands.Pull(_repository, new Signature(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), DateTime.Now), new PullOptions()
     {
         FetchOptions = fetchOptions,
         MergeOptions = new MergeOptions()
         {
             MergeFileFavor = MergeFileFavor.Theirs,
             CommitOnSuccess = true
         }
     });
    
     foreach (Remote remote in _repository.Network.Remotes)
     {
         Commands.Fetch(_repository, remote.Name, new string[0], fetchOptions, null);
         _repository.Network.Fetch(remote.Name, remote.FetchRefSpecs.Select(r => r.Specification), fetchOptions);
     }
    
Expected behavior
  1. Deleted tags shouldn't come up when using _repository.Tags
Actual behavior
  1. Deleted tags come up in _repository.Tags
Version of LibGit2Sharp (release number or SHA1)

Libgit2Sharp 0.26.2

Operating system(s) tested; .NET runtime tested

.Net Core 3.5, Microsoft Visual Studio Professional 2019 Version 16.9.0, .Net Framework 4.7.03190, Microsoft windows 10 pro.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Reproduza o problema com LibGit2Sharp 0.26.2 usando as chamadas Pull e Fetch mostradas e, em seguida, inspecione como _repository.Tags é populado depois que uma tag remota é excluída. Compare as refs obtidas com a lista de tags esperada; considera-se concluído quando as tags remotas excluídas não aparecem mais em _repository.Tags.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
csharp, git
Domínio
devtools
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.