Open neoeinstein opened 6 years ago
Had a similar issue in #47677 which was closed as duplicate. Looking forward to the fix to this one.
@neoeinstein This is working in version 1.28.2.
@neoeinstein Do you confirm this?
I can confirm that this appears to be working now with 1.28.2. Thanks!
I can confirm you can add files with unicode names, but:
Had a similar issue in #47677 which was closed as duplicate. Looking forward to the fix to this one.
When the unicode characters are in folder names, it still fails.
Just in case it's relevant, I'm on 1.34.0, macOS 10.14.5.
This is still happening for me in 1.46.1 on macOS 10.15.5
Git: fatal: /Users/pepelsbey/Projects/Пепелсбей.net/Блог/playground/28/.editorconfig: '/Users/pepelsbey/Projects/Пепелсбей.net/Блог/playground/28/.editorconfig' is outside repository
As you can see I have Cyrillic folder names.
@pepelsbey You have a different issue. Please update to Git 2.27 and it will be fixed.
@joaomoreno I have Git 2.27 installed on my system. I believe that’s the one VS Code uses.
$ git --version
git version 2.27.0
But I still have this problem.
I managed to reproduce it with the minimal setup:
mkdir й && cd й
git init
touch file.md
It works fine if the folder is named q
instead of й
.
What exact keyboard combination do you press to write й
?
It’s a single letter on the same key as q.
й
CYRILLIC SMALL LETTER SHORT I
Unicode: U+0439, UTF-8: D0 B9
BTW, sometimes macOS (for some reason) uses two symbols to reproduce it: и
plus combining top character (not sure which one).
I have the same problem with Japanese path name and git version 2.29.2.
It works for me now as expected in 1.51.1 on macOS 11.0.1 with git 2.29.2
I managed to reproduce it with the minimal setup:
1. `mkdir й && cd й` 2. `git init` 3. `touch file.md` 4. Open the folder in VS Code (1.46.1) 5. Go to Source Control panel 6. Try to stage file.md
It works fine if the folder is named
q
instead ofй
.
Just tested and it works:
EDIT 1: Also works on M1
EDIT 2: Problem is not completely solved. If the folder name starts with a capital letter, the error is still present :( Folder was created via Finder
EDIT 3: Did more tests… Now I can't reproduce the problem as described in EDIT2… Really strange ;) Folders were created via mkdir
EDIT 4:
Now I know what is going on. If the folder is created via shell with mkdir
it works. If the folder is created or renamed via Finder it fails.
@pepelsbey
BTW, sometimes macOS (for some reason) uses two symbols to reproduce it:
и
plus combining top character (not sure which one).
Look up dead keys. After YEARS suffering with them I could finally disable them on Windows. (Using Microsoft Keyboard Layout Creator.)
Sorry if my reply is off topic. 😅
Unfortunately it’s still broken in 1.59.1. Here’s another way to reproduce:
cd й
enter the foldergit init
init repositorytouch file.md
create a filecode .
open the folder in VS CodeAnd you’ll see that repository doesn’t exist:
But it works fine with и letter for the folder name:
Now I know what is going on. If the folder is created via shell with mkdir it works. If the folder is created or renamed via Finder it fails.
Unfortunately I cannot reproduce that.
Unfortunately it’s still broken in 1.59.1. Here’s another way to reproduce:
- Finder: File > New Folder > й
cd й
enter the foldergit init
init repositorytouch file.md
create a filecode .
open the folder in VS Code- Go to Source Control panel
And you’ll see that repository doesn’t exist:
![]()
But it works fine with и letter for the folder name:
![]()
If I follow those steps, I see the repository as not initialized for a few seconds, then it shows up normally. But it still won't stage any file.
This is the output from the git log:
Looking for git in: /usr/local/bin/git
Using git 2.31.1 from /usr/local/bin/git
> git rev-parse --git-dir
Open repository: /Users/gabriel/Downloads/test/ú
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/main refs/remotes/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --local branch.main.github-pr-owner-number
> git config --get commit.template
> git config --local branch.main.github-pr-owner-number
> git check-ignore -v -z --stdin
> git config --global user.email
> git config --global user.name
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/main refs/remotes/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose
> git config --get commit.template
git.stage 1
git.stage.scmResources 1
> git add -A -- /Users/gabriel/Downloads/test/ú/file.md
fatal: /Users/gabriel/Downloads/test/ú/file.md: '/Users/gabriel/Downloads/test/ú/file.md' is outside repository at '/Users/gabriel/Downloads/test/ú'
Now I know what is going on. If the folder is created via shell with mkdir it works. If the folder is created or renamed via Finder it fails.
Unfortunately I cannot reproduce that.
I could and can confirm. Using mkdir it works as it should. As soon as I rename it on Finder, it breaks again. It doesn't seem to be a problem with git, as I can git add file.md
and git rm --cached file.md
from a terminal without problem, and even vscode reflects changes correctly.
It doesn't seem to be a problem with git
Yes, that’s the point. When GUI fails to stage files I open VS Code’s terminal to do it via CLI using the same git binary.
I have the same issue now. Have anyone solved this?
I have exactly the same issue with éèà letters, in French. But this is come from git. not from Vscode. try this in terminal : git add -A -- /Users/me/Documents/Activités/index.html any solution? thank you
Even though this issue looks similar to #135257 #134696, why hasn't it been resolved for over four years since 2018?
System:
Problem:
Solution:
mkdir Программа
P.S. Maybe u should restart vs code if it's not working
P.S.S. It works for me, but it may not work for you, just try)
Same issue. This has been going on since 2018, how is it possible that there is no working solution?
This is still relevant as of 02/2024. Would there be a way to look at/change which commands are run in the background when the Git GUI is used?
@johannes-langer, could you please share the steps that you have followed to reproduce this? I have spent some time trying to create folders/files using Finder, VS code, terminal and I am unable to reproduce the issue using the latest version of VS Code Insiders and git version 2.42.0
.
@johannes-langer, could you please share the steps that you have followed to reproduce this? I have spent some time trying to create folders/files using Finder, VS code, terminal and I am unable to reproduce the issue using the latest version of VS Code Insiders and
git version 2.42.0
.
I can still reproduce the issue as mentioned on https://github.com/microsoft/vscode/issues/41246#issuecomment-908688963
gabriel@Gabriels-MacBook-Pro й % sw_vers ProductName: macOS ProductVersion: 12.6.7 BuildVersion: 21G651 gabriel@Gabriels-MacBook-Pro й % git version git version 2.44.0 gabriel@Gabriels-MacBook-Pro й % code-insiders --version 1.88.0-insider cc1f5e3acfad98ed519befc1ebfd199777d135f4 x64
@MDKi, could you please share a recording (https://gifcap.dev) with the repro steps? Thanks!
Steps to Reproduce:
defaŭlto.html
.fatal: pathspec 'c:\…\defaulto.html' did not match any files
Git log reports that it ran the following command: "git add -A -- c:\…\defaŭlto.html"
Running the same command from the git command line in Powershell works without a problem, but also fails from the normal Windows command prompt. Reviewing StackOverflow and other locations, it appears that this is a limitation of the Windows command prompt, but I thought I would document it here since it has a knock-on effect for the Git panel.
Reproduces without extensions: Yes