question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Git gutters don't show on filenames that have changed case

See original GitHub issue
  • VSCode Version: 1.47.3 91899dcef7b8110878ea59626991a18c8a6a1b3e
  • OS Version: MacOS 10.14.6

Steps to Reproduce:

1. Initialize a git repository~ 2. Add a capitalized filename, e.g. Counter.jsx 3. Commit the file 4. Make some changes in the file and save

The file will show as modified in the explorer, but the changes are not shown in the gutter. If you follow the same step but with a lowercase filename instead, the modifications will appear in the gutter. This is problematic for React projects where uppercase filenames are not uncommon.

Edit: See my modified instructions below

This issue was already brought up in #48714 and closed by 375411e, but the issue still occurs. I’m opening this new issue since the old one is locked.

Does this issue occur when all extensions are disabled?: Yes

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:3
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Dionysusnucommented, Oct 3, 2022

I’d just like to point out the bug also stretches to the built-in diff view. If you open that, select a range, right click and use “Stage selected ranges”, it gets staged in git as a new file that has the original casing, with the additions from the selected range as its only content.

While that original-case file is staged, the gutters do show up in the editor for the new-case file. Trying to stage something again in the diff view appends the additions from that range to the original-casing file.

It also creates an entry for the original-case file in the unstaged changes list. Viewing the diff of this shows it as the whole file being an addition, except for the range originally marked for staging.

Unstaging the original-case file in its entirety makes everything go back to the same state as before the first stage action, in which the file is shown only once in the changes window, and the gutters are not visible.

As suggested in https://github.com/microsoft/vscode/issues/103444#issuecomment-687071845, the bug stuck around if reloading while the file was open, but went away after closing all open file views and then reloading window.

1reaction
jriekencommented, Sep 7, 2020

Well, I guess the uri identity service won’t help you then because it doesn’t know what the actual representation is. If the git is so sensitive then I am afraid that you need to resolve the true casing before interacting with git.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git's not detecting file name casing change - Stack Overflow
txt opens the README.txt file, Git is correct to ignore file-name-case changes because they're not relevant. You can temporarily turn off core.
Read more >
Gutter highlighting of VCS changes not displaying - YouTrack
VCS changes usually display a highlighting in the gutter. But this time is it not highlighting for most of the changes (except on...
Read more >
Configuration - Helix
It is also possible to trigger configuration file reloading by sending the USR1 ... gutters, Gutters to display: Available are diagnostics and diff...
Read more >
Visual Studio Code (VS Code) integration with Git Source ...
Once we make the changes in the Git repository scripts, VS Code adds annotations in the gutter and the overview ruler. A red...
Read more >
About IntelliJ IDEA Changelists and Git Staging | foojay
This view shows the last known version that Git has on the left and then your ... Let's say you have changes that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found