Making split hunks addable
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- git
- Ambito
- tooling
Direzione di ricerca
Inizia leggendo le sezioni collegate del documento alle righe 86-89 e 212-217. Il lavoro è completato quando gli hunk divisi conservano informazioni sufficienti sulle righe originali per poter essere ricombinati, inclusi gli hunk divisi ricorsivamente, mentre la corrispondenza degli hunk considera l’intersezione e la similarità degli intervalli di righe.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The problem as I understand it is that it's easy to separate a diff into two the way github desktop does it, but putting them back together doesn't work.. But what if we only needed to store and cascade the original line number when splitting diffs to make them addable again?
As an example, if we split this:
@@ -1,4 +1,7 @@
a
b
+c
+d
+e
f
g
into these two:
@@ -1,4 +1,5 @@
a
b
+d // original line 4
f
g
@@ -1,4 +1,6 @@
a
b
+c // original line 3
+e // original line 5
f
g
Then we have enough information to reverse the split? It works even if we split the second diff into two again.
Also, about matching up the hunk ranges properly. I don't think we do a good enough job right now, but with a bit of effort we could have something quite solid that matches based on both line range intersection as well as the similarity score @Qix- coded up a while back.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 9
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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.
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
stephrobert/dsoxlab#238 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sublimehq/package_control#1780 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
typelevel/sbt-typelevel#929 ·
-
Update HugeIcons library Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
antfu-collective/icones#398 ·