libgit2 / libgit2/libgit2sharp
Repository.Commits.QueryBy is missing changes
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 3.5k
- Forks
- 925
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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).
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza reproduciendo las LogEntries que faltan para la ruta afectada en Windows/.NET 4.6 y comparando QueryBy con el enfoque de diff de todos los commits descrito en el issue. Lee LibGit2Sharp/Core/FileHistory.cs alrededor de la línea 137, centrándote en cómo se gestionan los commits con varios padres. Se considera terminado cuando QueryBy devuelve todos los cambios de la archivo afectado, incluidos los cambios relacionados con merges.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, git
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100