libgit2 / libgit2/libgit2sharp
Repository.Init wants to write to workingDirectoryPath
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
Run the following code with workingDirectoryPath set to a write-protected directory path and gitDirectoryPath set to a writable directory path:
Lib2GitSharp.Repository.Init(workingDirectoryPath: "/", gitDirectoryPath: "/some/dir/.git")
Expected behavior
The Init() call works exactly as this git command: git --git-dir /some/dir/.git --work-tree /:
- it creates a .git repository directory at
/some/dir/.gitwith its config'score.worktreeset to/ - it does not touch the
--work-treedirectory/in any way and thus does not need write permissions in this directory
Actual behavior
An Exception of type Lib2GitException is thrown:failed to initialize repository with template '.git': Permission denied
Version of LibGit2Sharp (release number or SHA1)
0.26.2 (NuGet)
Operating system(s) tested; .NET runtime tested
Linux 5.9.14-arch1-1 #1 SMP PREEMPT Sat, 12 Dec 2020 14:37:12 +0000 x86_64 GNU/Linux
Microsoft.NETCore.App 3.1.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
Comienza en el punto de entrada Repository.Init y reproduce el problema con un workingDirectoryPath protegido contra escritura y un gitDirectoryPath escribible. Se considera terminado cuando la inicialización crea el repositorio y establece core.worktree en el directorio de trabajo sin intentar escribir allí, siguiendo el comportamiento indicado del comando git.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, git
- Área
- api, backend
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 35/100