-
Notifications
You must be signed in to change notification settings - Fork 29k
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
[Bug] File is listed in the "Changes" section even if it has no change #133417
Comments
@wenfangdu I'm unable to figure out whats wrong here 😕 I mean you added a new line and then staged the changes, then under diff viewer its reflecting that exact new line change. That's perfectly fine 🤔 . Pardon me if I missed something? |
@Lemmingh @hamzawaleed0102 Please see the updated issue, and remove the "confused" emoji if it's clear for you now. |
@wenfangdu Oh got it, now makes sense. I'm not a pro in it so I need to see whether it's a bug or expected behaviour. After all changing the file encoding is still a change but sometimes not a visible one. |
@hamzawaleed0102 It's reproducible for new files with |
OK. I can tell what happened. But I'm not sure who is to blame: VS Code, Git, or ConHost. When invoking "Git: Stage Selected Ranges" ( git hash-object --stdin -w --path test.ahk Inspect the created object, and we can surprisingly find that it does not have BOM. You can get a visual hint by: git status --verbose |
/duplicate #111915 vscode/extensions/git/src/git.ts Lines 1278 to 1283 in adee8fa
The encoding information is lost. I can also reproduce the problem with GB 2312.
|
Does this issue occur when all extensions are disabled?: Yes
File encoding is UTF-8 with BOM.
Steps to Reproduce:
Notice the diff editor in the "Changes" (Not "Staged Changes") section shows no change, but the file is still listed there nonetheless.
The text was updated successfully, but these errors were encountered: