libgit2 / libgit2/libgit2sharp
Failing to read huge pack files
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
I'm using lib2gitsharp with big enterprise repositories which may have pack files with a size of 4 to 5 GB. When the size of the initially cloned pack file exceeds a certain value, reading operations will fail. I started with a 4.5 GB pack file repo, which I updated incrementally for some months. This poses no problems. When I freshly clone the same repo now, the initial pack file has (due to ongoing development) grown to 5.5 GB, which lib2gitsharp cannot handle any more.
Reproduction steps
Connect to a repository with pack files of size between 4.5 GB (working) and 5.56 GB (failing).
Iterate the commits of a branch or call a Diff.Compare on two Trees.
Expected behavior
Iterating the commit collection or comparing two trees works without exception.
Actual behavior
A LibGit2SharpException exception is thrown:
LibGit2Sharp.LibGit2SharpException
HResult=0x80131500
Message=invalid pack file - delta offset is zero
Source=LibGit2Sharp
StackTrace:
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in C:\projects\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 154
Version of LibGit2Sharp (release number or SHA1)
0.26.2
Operating system(s) tested; .NET runtime tested
Win 10, .NET Framework 4.8
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
Empieza reproduciendo el fallo con un repositorio que contenga un archivo pack de 5.56 GB y, después, inspecciona la ruta de excepción en LibGit2Sharp/Core/Ensure.cs:154. Compara la iteración de commits y el comportamiento de Diff.Compare con el caso funcional de 4.5 GB; se considera completado cuando ambas operaciones terminan sin la excepción de archivo pack no válido.
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