flaky repo.reset() behavior
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 408
- Ø Merge
- 2 T. 57 Min.
- Gemergte PRs (30 T.)
- 7
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die gemeldete CI-Sequenz mit pygit2 1.2.0 zu reproduzieren: Ändere eine Datei in einem Nicht-Bare-Repository und committe sie, rufe repo.reset() mit GIT_RESET_HARD auf, erstelle anschließend ein neues Repository und vergleiche repo.status() mit repo.diff(). Abgeschlossen ist die Untersuchung, wenn festgestellt wurde, ob das sporadische Ergebnis WT_MODIFIED von pygit2 oder libgit2 stammt, und die Ursache oder ein bestätigter Lösungsweg dokumentiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, python
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100