libgit2 / libgit2/libgit2sharp

Cannot stage a folder which contains a file with name ".git"

Abierto
#1,699 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
  1. Use LibGit2Sharp to work on a local git repository
  2. Create some random sub folders in that local repository folder
  3. Create in some of these subfolders a file with the name ".git"
  4. Try to stage all changes
Expected behavior

Like with e.g. Git for Windows
https://git-scm.com/download/win
The file gets just added to the repro without any exception

At least I would expect a better error description

Actual behavior

The LibGit2Sharp stage process crashes with an exception.
The exception contains the message "Invalid path"
It took a while till I figured out why this actually happens.

Version of LibGit2Sharp (release number or SHA1)

Nuget version of LibGit2Sharp: 0.26.0 (Current latest)
Nuget version of LibGit2Sharp.NativeBinaries: 2.0.267 (Newer version available but not compatible to newest LibGit2Sharp)

Operating system(s) tested; .NET runtime tested

Windows 10 Version 1903 - Build 18362.239

Project settings

The project in which I use the LibGit2Sharp is build with Visual Studio 2019.
The project uses the .Net Framework 4.7.2

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproducir el staging en Windows 10 con LibGit2Sharp 0.26.0 y LibGit2Sharp.NativeBinaries 2.0.267 usando un repositorio que contenga un archivo llamado ".git" en una subcarpeta. Comparar el comportamiento con Git for Windows y, después, rastrear la ruta de staging que produce la excepción "Invalid path". Se considera terminado cuando el archivo se puede incluir en el staging sin una excepción o cuando el error identifica claramente la causa.

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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.