flaky repo.reset() behavior
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 1.7k
- Fork
- 408
- Merge medio
- 2g 57m
- PR unite (30g)
- 7
Descrizione
This issue is about repo.reset() not seeming to work reliably 100% of the time.
I have some CI tests that modify a file in a non-bare repo, commit the change to a branch, and then call repo.reset() with GIT_RESET_HARD to restore to a different commit. After calling reset, to confirm that the reset was successful, the test creates a new Repository object and checks the repository's status using repo.status(). Occasionally (but very rarely), the status check comes back showing the original file still as WT_MODIFIED. A subsequent call to repo.diff() confirms the difference in the file. Is there something pygit2 is or isn't doing that could cause reset() to behave flakily like this? Or is libgit2 the more likely culprit?
This is using pygit2 1.2.0. I can try upgrading, but is there a reason to think this would be fixed in a newer version (e.g. a known issue that was fixed)? I haven't found anything like this in pygit2 or libgit2's issue tracker or release notes.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo la sequenza CI segnalata con pygit2 1.2.0: modifica ed esegui il commit di un file in un repository non bare, chiama repo.reset() con GIT_RESET_HARD, quindi crea un nuovo Repository e confronta repo.status() con repo.diff(). Il lavoro è completato quando è stato identificato se il risultato intermittente WT_MODIFIED proviene da pygit2 o da libgit2 e sono state documentate la causa o una procedura di correzione confermata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, python
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100