Skip to content

🐛 Handle diff.mnemonicPrefix #215

@waldyrious

Description

@waldyrious

Committed file:

$ git show HEAD:diff-test.txt
foo
    bar
return parent_names + [self.tree_name.value]

foo
bar

Uncommitted changes done to the diff-test.txt file (without renaming it):

$ git status -s
 M diff-test.txt

Uncommitted contents of the file:

$ cat diff-test.txt
foo yeah
	bar
parent_names += (self.tree_name.value,)
if include_module_names:
	skdjfh
	kjlkfjs
return parent_names

foo-one
bar-two

Diff as shown by git -P diff:

diff --git i/diff-test.txt w/diff-test.txt
index 5fd0037..3f0bbd0 100644
--- i/diff-test.txt
+++ w/diff-test.txt
@@ -1,6 +1,10 @@
-foo
+foo yeah
 	bar
-return parent_names + [self.tree_name.value]
+parent_names += (self.tree_name.value,)
+if include_module_names:
+	skdjfh
+	kjlkfjs
+return parent_names

-foo
-bar
+foo-one
+bar-two

Delta shows the file as renamed:

$ git diff | delta

renamed: i/diff-test.txt ⟶   w/diff-test.txt
─────────────────────────────────────────────────────────────────────────────────

(Originally reported in #205)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions