libgit2 / libgit2/libgit2sharp

Repository.Reset doesn't checkout files having only a single line's line ending changed

Aperta
#1,327 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
3.5k
Fork
925
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

If the line ending of only one line somewhere in the middle of a file, the file is not detected as Dirty by the reset method and the change is not reverted after calling it.

On the other hand Repository.RetrieveStatus correctly returns the file as modified

I'm attaching a test repo which shows the issue with version v0.22 from NuGet (Note that I had to change the zip file's extension to txt because otherwise GitHub rejected it for some reason...).

test-repo.zip.txt

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con il repository di test allegato e gli entry point Repository.Reset e Repository.RetrieveStatus. Confronta il modo in cui ciascuno gestisce un file con un terminatore di riga modificato; il lavoro è completato quando Reset rileva il file come Dirty e annulla quella modifica, con un test di regressione che copra il caso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, git
Ambito
devtools
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.