Incorrect detection of modified/renamed files
Offen
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
Test code:
import pygit2
repo = pygit2.Repository(pygit2.discover_repository(<repo_path>))
status = repo.status()
for filepath, flags in status.items():
print(filepath, flags)
Running Result:
child.py 128
example.py 128
mvv.txt 513
mvvv.txt 4
name2.py 128
parent.py 128
x/mvv.txt 128
x/mvvv.txt 513
x/parent2.py 128
xname.py 128
zname.py 512
zname1.py 128
However, git status given me the result as:
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
renamed: mvvv.txt -> mvv.txt
new file: x/mvvv.txt
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: mvv.txt
deleted: x/mvvv.txt
deleted: zname.py
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/
child.py
example.py
name2.py
parent.py
x/mvv.txt
x/parent2.py
xname.py
zname1.py
Which contains the renamed records.
Why this happened?
(If you want the test repo, I can zip it and send to your team mail if anyone provide me one.)
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 mit dem gezeigten Python-Snippet und dem Einstiegspunkt repo.status(), reproduziere dann die aufgeführten Flags anhand der entsprechenden Ausgabe von git status. Bestimme, ob die fehlenden oder abweichenden Umbenennungsdatensätze erwartetes Verhalten oder ein Fehler sind, und dokumentiere das erwartete Ergebnis sowie einen reproduzierbaren Verifikationsweg.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, python
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 28/100