jonas / tig

Text-mode interface for git
https://jonas.github.io/tig/
GNU General Public License v2.0
12.41k stars 607 forks source link

Fail to edit non-ascii filename #1262

Closed valumapps closed 1 year ago

valumapps commented 1 year ago

When pointing at a file or a diff in tig, pressing e key will spawn an editor open to the pointed file. However, if the file contains non-ASCII chars, tig fails to spawn the editor.

Example: in diffstat

In diffstat, there are 2 lines

2023-01-28-aaa.md
"2023-01-28-esp\303\250ces.md"

pressing e on the first file works, not on the second (it should be 2023-01-28-espèces.md btw, not "2023-01-28-esp\303\250ces.md").

Example: in diff

Same when viewing the diff of both files, e on the diff of the first file works, but not for the diff of the second file.

Counter-example: in tree (t)

There, pressing e on a filename even if non-ASCII works. But filenames are poorly printed anyway and they are badly sorted.

"2023-01-28-esp\303\250ces.md" should be 2023-01-28-espèces.md And the filename shouldn't be before the others. It's sorted before because of the quote, but the real filename doesn't contain any quote, it's tig (git?) who insists on adding it.

koutcher commented 1 year ago

Check #1236.