Open Ramin-RX7 opened 10 months ago
@Ramin-RX7, thanks for filing this issue. Is there anything specific for the files in which you are able to reproduce the issue? Are they all in the same directory maybe? Do you by any chance have symbolic links inside the git repository? A recording using (https://gifcap.dev) would also be helpful to further investigate the issue. Thanks!
@lszomoru As you can see in the video, In the same directory one file changes works fine but the other one don't. video
However it is worth mentioning that only 2 markdown files works fine showing the changes (out of 30!)
Also I couldn't find any relation between the files that this feature works correctly.
@alexr00, are you aware of any known issues that would result in this behaviour? Thanks!
I don't know of any issues that would cause this and I'm not able to repro the issue. @Ramin-RX7 could you try VS Code version 1.85?
@alexr00 Currently I'm on 1.85.1. Still not fixed
@Ramin-RX7 I'm going to need some more help understanding how to reproduce the issue. Can you try the following:
Does the issue still happen if you do only those steps?
@alexr00 I tried the steps you provided. Yes I still face the issue.
Since you can not reproduce it maybe you can try the same repo I'm facing it. If you can not do it, it's still ok.
In the upcoming week I will try on some other repositories to see if I can find a reason that this happens on some files and not on some others.
Also it might be good to know that this does not happen when I tried it in a Github Codespace (via vscode in web browser). The line changes where shown fine.
Thanks for trying @Ramin-RX7. I'm still not able to repro. Would you be able to take a full screen recording of what you do when you repro the issue, starting from when you reload or open VS Code?
@alexr00 Sorry, I have been busy these past few days and forgot about this. Here as you can see all editors are closed. I reload the vscode. Then I open two markdown files randomly and the line changes are not shown.
Thanks @Ramin-RX7! Somehow, I am still not able to repro the issue. @lszomoru is there somehow some setting for git that will prevent some files from being noticed?
I don't believe that this is caused by "git not noticing files". When I look at the recording I see that when the file is saved, the Source Control view refreshes and the modified file appears in the list of changes.
The problem seems to be with the dirty diff decorator not appearing when the new lines are added to the markdown files. As far as I know, when a file is being opened, VS Code will call the git file system provider to get the contents of the latest version of the file. From where VS Code will compute diffs based on the contents of the original file, and the dirty file.
@Ramin-RX7, in your recording you are adding new lines to the file. What happens if you modify an existing line? Does the modified line decorator appears for the modified line?
@lszomoru Nothing happens basically. The same thing that you mentioned (Source Control view refreshes and the modified file appears in the list of changes.
) happens but the line changes in the editor (blue color for modified lines) are not shown
@Ramin-RX7, thanks for the update. Could you please try the following:
Hey @lszomoru, This is the output I get:
# When I open a file (factories_mapping.md)
2024-01-24 12:06:16.189 [info] > git check-ignore -v -z --stdin [64ms]
2024-01-24 12:06:17.441 [info] > git ls-files --stage -- F:\Coding\Github\Shifty\docs\principals\factories\factories_mapping.md [88ms]
2024-01-24 12:06:17.452 [info] > git show --textconv :docs/principals/factories/factories_mapping.md [155ms]
# After I make some changes:
2024-01-24 12:06:37.967 [info] > git config --get commit.template [132ms]
2024-01-24 12:06:37.972 [info] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) --ignore-case refs/heads/main refs/remotes/main [82ms]
2024-01-24 12:06:38.050 [info] > git ls-files --stage -- F:\Coding\Github\Shifty\docs\principals\factories\factories_mapping.md [101ms]
2024-01-24 12:06:38.136 [info] > git status -z -uall [103ms]
2024-01-24 12:06:38.172 [info] > git show --textconv :docs/principals/factories/factories_mapping.md [66ms]
Does this issue occur when all extensions are disabled?: Yes
It's been a long time that I can not see the git changes next to editor lines in my markdown files. I disabled all extensions and it seems there is a problem with vs code itself, not extensions I use.
Steps to Reproduce:
However this does not always happen. At first I though it happens on specific git repos but now some markdown files of my repo can detect changes, some dont.
This problem also corrupt the git (source control) changes where when I open those files (the ones that do not mark the new/modified lines), instead of showing the full file and the changes, it only shows me the staged changes lines.
As of now I'm facing this issue in this repo. The main README.md works perfectly fine, but other markdown files in the repo have the problem i mentioned.
A file that works fine: (README.md)
A file that does not work as expected: