Open fantab01 opened 1 month ago
Please execute the git diff <path to your file>
command in the terminal to see the actual diff. But I agree that switching to reading more shouldn't change the file itself.
Please execute the
git diff <path to your file>
command in the terminal to see the actual diff. But I agree that switching to reading more shouldn't change the file itself.
Thank you for your advice, it’s very useful. This is another classic line ending issue. I have temporarily solved it by using git config core.autocrlf true
. However, I am curious as to why switching to reading mode triggers the plugin's diff changes, and how you plan to resolve it. This situation can indeed cause confusion.
This plugin doesn't touch your file when switching to reading mode, that has to be Obsidian. I think the plugin is working mostly correctly. The only issue is that the diff view doesn't show that the line endings have changed, but from what I know that's typical for diff views.
Describe the bug
Describe
When a complex md file uses the discard function, it will show that the file has been changed when switching to reading mode, but when clicking the diff view, it will show that there is no difference.(The gif is recorded in a sandbox environment. The only change to the sandbox environment is to install the git plugin.)
Relevant errors (if available) from notifications or console (
CTRL+SHIFT+I
)Steps to reproduce
Special notes for reproducing bugs.md![bug](https://github.com/denolehov/obsidian-git/assets/45958766/a3384bb6-2da6-4312-aafd-a38eea6f1eb3)
Expected Behavior
Switching to reading mode shouldn't change the file, right? I'm curious about the cause of this bug.
Addition context
No response
Operating system
Windows
Installation Method
None
Plugin version
v2.24.2