`Repository.diff(cached=True)` does not list diffs for indexed files
Abierto
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
This is with pygit2 version 0.24.0.
$ git init
Initialized empty Git repository in /tmp/minimal/.git/
$ touch foo
$ git add foo
$ git commit -am "First commit"
[master (root-commit) 3551222] First commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 foo
$ echo "foobar" >> foo
$ git add foo
$ git diff --cached
diff --git a/foo b/foo
index e69de29..323fae0 100644
--- a/foo
+++ b/foo
@@ -0,0 +1 @@
+foobar
$ python
>>> import pygit2
>>> repo = pygit2.Repository('.')
>>> list(repo.diff(cached=True))
[]
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
Start by reproducing the documented pygit2.Repository('.') and Repository.diff(cached=True) example, comparing its result with git diff --cached. Trace the cached diff entry point and related tests in pygit2, then verify that indexed-file changes are returned and match the command-line diff.
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
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 45/100