Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Gui can't view file with name starting with "~" in "Unstaged Changes" window #4349

Open
aykarpov opened this issue Mar 16, 2023 · 0 comments · May be fixed by prati0100/git-gui#96
Open

Comments

@aykarpov
Copy link

  • [ v ] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
git version 2.40.0.windows.1
cpu: x86_64
built from commit: 1d90ca2906dd4b7ddaf0669a13c173ec579d794a
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Microsoft Windows [Version 10.0.14393]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
default

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

CMD

Create a new repository.

Add a file with a name starting with "~" (for example, "~.txt").

Open Git GUI.

Click on the "~.txt" file.
  • What did you expect to occur after running these commands?

View the contents of the file in the main window.

  • What actually happened instead?

The message appears: "Error loading file: user ".txt" doesn't exist"

git

rimrul added a commit to rimrul/git-gui that referenced this issue Mar 23, 2023
prvent TCL from doing tilde expansion on literal filenames.

This fixes git-for-windows/git#4349

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
rimrul added a commit to rimrul/git-gui that referenced this issue Mar 23, 2023
prevent TCL from doing tilde expansion on literal filenames.

This fixes git-for-windows/git#4349

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
rimrul added a commit to rimrul/git-gui that referenced this issue Mar 23, 2023
prevent TCL from doing tilde expansion on literal filenames.

This fixes git-for-windows/git#4349

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
rimrul added a commit to rimrul/git that referenced this issue Oct 18, 2023
When git-gui encounters a file name starting with a tilde character (~),
TCL "helpfully" expands that tilde into a (probably non-existing) users
home directory. But in git-gui we're often not dealing with user supplied
paths, where such an expansion might be expected, but actual names of files.

Prevent TCL from doing tilde expansion on these literal filenames.

This fixes git-for-windows#4349

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants