ugit icon indicating copy to clipboard operation
ugit copied to clipboard

git status doesn't show paths with escaped characters

Open mkielek opened this issue 2 years ago • 2 comments
trafficstars

Hi,

Great tool!

There's one minor issue. git status for an example file name with the ü character.txt would return: file name with the \303\274 character.txt for git status -z: file name with the ü character.txt but unfortunately ugit skips the file.

Please fix me in spare time ;).

mkielek avatar Aug 17 '23 12:08 mkielek

@mkielek thanks for reporting this. I think I've seen some issues with git and multibyte characters before. Do you have a repo you can point me to that helps reproduce this issue?

StartAutomating avatar Aug 20 '23 22:08 StartAutomating

Unfortunately I can't point you to the repo as we don't use ugit. I was only experimenting with this. But you can use the following repro steps:

git init
New-Item -Path "file name with the ü character.txt"
git status
# see output 1 below

git status -z
# see output 2 below

Install-Module ugit -Scope CurrentUser
Import-Module ugit -Force -PassThru
git status
# see output 3 below
# output 1
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        "file name with the \303\274 character.txt"

nothing added to commit but untracked files present (use "git add" to track)

# output 2
?? file name with the ü character.txt

# output 3
GitRoot: <root path>

On Branch: master

Nothing to commit, working tree clean

$PSVersionTable.PSVersion: 7.3.6 git -v: 2.37.2.windows.2 [console]::OutputEncoding.CodePage: 850

mkielek avatar Aug 21 '23 08:08 mkielek