Skip to content

🐛 Changes in files with non-Latin names incorrectly imply these files being renamed #1821

@koterpillar

Description

@koterpillar

When the name of a changed file contains non-Latin characters, delta shows it as renamed instead of just the contents being changed.

To reproduce:

$ git init
$ echo one > привет.txt; echo three > hello.txt
$ git add .
$ echo two > привет.txt; echo four > hello.txt
$ git diff

Delta output:

image

Note the headers for the two files:

...
hello.txt
...
a/\320\277\321\200\320\270\320\262\320\265\321\202.txt ⟶   b/\320\277\321\200\320\270\320\262\320\265\321\202.txt
...

Raw git diff output:

$ git --no-pager diff
diff --git a/hello.txt b/hello.txt
index 2bdf67a..8510665 100644
--- a/hello.txt
+++ b/hello.txt
@@ -1 +1 @@
-three
+four
diff --git "a/\320\277\321\200\320\270\320\262\320\265\321\202.txt" "b/\320\277\321\200\320\270\320\262\320\265\321\202.txt"
index 5626abf..f719efd 100644
--- "a/\320\277\321\200\320\270\320\262\320\265\321\202.txt"
+++ "b/\320\277\321\200\320\270\320\262\320\265\321\202.txt"
@@ -1 +1 @@
-one
+two

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