view like `git diff --color-moved`
- Lingua principale
- Rust
- Stelle
- 22.5k
- Fork
- 773
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Sometimes code has simply been moved around, rather than deleted or added. It would be nice to be able to see this at a glance. The command `git diff --color-moved` will display this, or you can set `--color-moved` to be git's default with a command like `git config --global diff.colorMoved default`.
Sadly I do not see an option to achieve this behavior in gitui.
**Describe the solution you'd like**
I would like an option to make code that has been moved visually distinct from code that has been added or deleted. I think this should be visible when viewing diffs in the Status [1] tab.
Personally I think this should be enabled by default, but I'm certain some number of people will disagree with me.
**Describe alternatives you've considered**
The alternatives are manually looking to see whether code has merely moved, or to drop back to the git command line.
**Additional context**
delta successfully supports this feature: https://github.com/dandavison/delta/issues/72
Here's a blog post that alerted me to the existence of this feature: https://danyspin97.org/blog/modern-cli-applications-part-1/#bonus-color-moved
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by locating the Status tab's diff viewer and the code that invokes or configures git diff. Check how moved lines are currently rendered, then compare the result with git diff --color-moved; done means moved code is visually distinct in Status diffs, with the default-versus-option behavior resolved.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- git, rust
- Ambito
- cli, devtools
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100