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

Source Control in Visual Studio Code displays all files as newly created #233869

Open
obautis opened this issue Nov 14, 2024 · 2 comments
Open

Source Control in Visual Studio Code displays all files as newly created #233869

obautis opened this issue Nov 14, 2024 · 2 comments
Assignees

Comments

@obautis
Copy link

obautis commented Nov 14, 2024

Type: Bug

Problem Description:
In Visual Studio Code’s source control view, all files in the repository appear as if they are entirely new: the left side of the diff view is empty, while the right side shows the entire file in green, as if it was newly added. This issue does not occur in other Git applications, such as GitKraken or the command line, where changes are displayed correctly.

System and Setup:
• Operating System: macOS
• Visual Studio Code Version: 1.95.2

Steps to Reproduce:
1. Open the project in Visual Studio Code.
2. Make some edits to files (adding, removing, or modifying lines).
3. Go to the source control panel to review the diffs.

Expected Behavior:
The source control view should display only actual changes: removed lines in red on the left and added lines in green on the right.

Observed Behavior:
Every edited file appears as if it were completely new: the left side of the diff view is blank, while the right side shows the entire file in green.

Troubleshooting Steps Taken:
• Disabled and re-enabled Git: Enabled in Settings.
• Fully uninstalled and reinstalled Visual Studio Code.
• Cleared Git cache in Visual Studio Code.
• Tried different configurations for core.autocrlf.
• Verified and adjusted line-ending settings (CRLF/LF) in the repository and in VS Code.
• Started VS Code without user configurations (code --user-data-dir="").

Results of Testing in Other Applications:
This issue does not occur in other Git tools:
• GitKraken: Changes are displayed correctly.
• Git command line: git diff and other commands show the changes accurately.

Suspected Error or Area of Impact:
This might be an issue in Visual Studio Code’s Git integration on macOS or related to how VS Code manages line endings and formatting changes when calculating diffs.

Thank you for any guidance or solution that could help resolve this issue.

VS Code version: Code 1.95.2 (Universal) (e865366, 2024-11-07T11:07:22.054Z)
OS version: Darwin arm64 24.0.0
Modes:

System Info
Item Value
CPUs Apple M1 Pro (10 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 5, 4, 4
Memory (System) 16.00GB (0.18GB free)
Process Argv --crash-reporter-id c847df22-ab10-4782-958d-14449cf0de6f
Screen Reader no
VM 0%
Extensions (15)
Extension Author (truncated) Version
lit-html bie 1.11.1
vscode-eslint dba 3.0.10
gitlens eam 15.6.3
prettier-vscode esb 11.0.0
copilot Git 1.245.0
copilot-chat Git 0.22.2
go gol 0.42.1
vscode-peacock joh 4.2.2
vscode-language-pack-es MS- 1.95.2024102309
vscode-typescript-next ms- 5.8.20241112
material-icon-theme PKi 5.14.1
tsimporter pmn 2.0.1
es7-react-js-snippets rod 1.9.3
code-spell-checker str 3.0.1
JavaScriptSnippets xab 1.8.0
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrp:30673768
962ge761:30959799
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
0ee40948:31013168
dvdeprecation:31068756
dwnewjupyter:31046869
newcmakeconfigv2:31071590
impr_priority:31102340
nativerepl2:31139839
pythonrstrctxt:31112756
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31181875

Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.95.3. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@gjsjohnmurray
Copy link
Contributor

Please look at the Git channel of the Output panel to see if there are any clues there?

Does it happen on all your Git-enabled folders?

Does the Start Extension Bisect command point to any of your extensions as the cause?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants