libgit2 / libgit2/libgit2sharp
Repository.Commits.QueryBy is missing changes
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
This seems to have been brought up a couple of times already (a quick search showed #1401, #1591, https://github.com/libgit2/libgit2sharp/pull/963#issuecomment-355674649).
This is pretty weird: QueryBy returns 0 LogEntries, while going through all commits and diffing to the previous one shows the same changes/additions/renames as e.g. the SourceTree or Fork UI for the exact same path as for the QueryBy call.
Note that it only does that for some files, most files work fine. I haven't found a common pattern so far (e.g. specific characters, or only merges, or ...) but it looks like QueryBy is omitting merges and that might cause problems.

(commits in reverse order)
Expected behavior
QueryBy should return all changes to the file (as outlined in #963 where it was originally added).
Actual behavior
QueryBy returns 0 LogEntries.
Version of LibGit2Sharp (release number or SHA1)
git2-106a5f2
Operating system(s) tested; .NET runtime tested
Win 10, .NET 4.6
EDIT: Maybe I'm understanding the code wrong, but taking a quick peek at https://github.com/libgit2/libgit2sharp/blob/master/LibGit2Sharp/Core/FileHistory.cs#L137, I think QueryBy in fact ignores all commits that have more than 1 parent (e.g. all merges).
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece reproduzindo as LogEntries ausentes para o caminho afetado no Windows/.NET 4.6, comparando QueryBy com a abordagem de diff de todos os commits descrita na issue. Leia LibGit2Sharp/Core/FileHistory.cs por volta da linha 137, concentrando-se em como commits com múltiplos pais são tratados. O trabalho estará concluído quando QueryBy retornar todas as alterações do arquivo afetado, incluindo as alterações relacionadas a merge.
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