gitui-org / gitui-org/gitui

view like `git diff --color-moved`

Offen
#865 15 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
22.5k
Forks
773
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, rust
Bereich
cli, devtools
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.