Repository object init with literal GIT_DIR
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 1.7k
- Forks
- 408
- Merge medio
- 2 d 57 min
- PR fusionados (30 d)
- 7
Descripción
Consider the following corner case:
ben@f1:/tmp$ git init --bare weird.git
Initialized empty Git repository in /tmp/weird.git/
ben@f1:/tmp$ cd weird.git
ben@f1:/tmp/weird.git$ git init --bare .git
Initialized empty Git repository in /tmp/weird.git/.git/
ben@f1:/tmp/weird.git$ git rev-parse --git-dir
.git
ben@f1:/tmp/weird.git$ GIT_DIR="./" git rev-parse --git-dir
./
ben@f1:/tmp/weird.git$ python3 -c 'import pygit2; print(pygit2.Repository("./"))'
pygit2.Repository('/tmp/weird.git/.git/')
ben@f1:/tmp/weird.git$ GIT_DIR=./ python3 -c 'import pygit2; print(pygit2.Repository("./"))'
pygit2.Repository('/tmp/weird.git/.git/')
It's possible to use git to work on the repo with GIT_DIR="/tmp/weird.git".
How can I use pygit2 to work on the same repo ("/tmp/weird.git") and not the other repo in "/tmp/weird.git/.git"? Essentially, I'd like to init a pygit2.Repository object with a literal GIT_DIR, without performing repository discovery.
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 en el punto de entrada de inicialización de pygit2.Repository y compara su tratamiento de "./" con el comportamiento literal de GIT_DIR de Git. Comprueba el comportamiento disponible de libgit2 al abrir repositorios antes de decidir cómo debería representarse una ruta literal. Se considera terminado cuando un Repository puede apuntar a /tmp/weird.git sin descubrir /tmp/weird.git/.git, con cobertura para este caso de repositorio anidado.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- git, python
- Área
- devtools
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100