libgit2 / libgit2/libgit2sharp
Exception: "An item with the same key has already been added" while comparing commits
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
repository.Diff.Compare<Patch>(commitB.Tree, commitA.Tree);
Expected behavior
patch
Actual behavior
"exception": "System.ArgumentException: An item with the same key has already been added. Key: tools/firmware-utils/src/bcm_tag.h\n at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)\n at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)\n at LibGit2Sharp.Patch..ctor(DiffHandle diff)\n at LibGit2Sharp.Diff.u003cu003ec.u003c.cctoru003eb__36_0(DiffHandle diff)\n at LibGit2Sharp.Diff.BuildDiffResult[T](DiffHandle diff)\n at LibGit2Sharp.Diff.Compare[T](Tree oldTree, Tree newTree, IEnumerable`1 paths, ExplicitPathsOptions explicitPathsOptions, CompareOptions compareOptions)\n at
Version of LibGit2Sharp (release number or SHA1)
libgit2sharp/0.26.2
Operating system(s) tested; .NET runtime tested
ubuntu docker mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic
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 repository.Diff.Compare< Patch >(commitB.Tree, commitA.Tree) con los commits indicados y revisa el stack trace a través de Diff.Compare y LibGit2Sharp.Patch. Inspecciona cómo se gestiona la ruta duplicada tools/firmware-utils/src/bcm_tag.h; se considera terminado cuando la comparación devuelve un patch en lugar de lanzar la excepción de clave duplicada.
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
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100