Closed adam-ce closed 1 year ago
Unfortunately I've not been able to reproduce it.
I've done the following steps:
echo / > CMakeLists.txt
echo // > CMakeLists.txt
Am I missing something? It shouldn't show an "old-new" comperison because it's a new file, weird.
weird. at work i hit the problem repeatedly, at home not. i'll test again at work.
Hello!
Have you been able to test it?
ye, just now. thanks for the ping.
i can't reproduce it any more at work either. so i guess it was a glitch in the matrix. i'll reopen if it comes up again.
so this file fails to diff for me in gitnuro. i guess, that there is some sort of special character, but i was unable to isolate it.
(that is, unzip and add it to a repo)
formatting also fails in git cola. but at least the file is there.
It's because of this
For context: raw = file content
For some reason, there is a \r
without being part of a line jump, which is extremly weird (in the image there are 2 \r
in a row). JGit detects it as something that should not be in a text file and therefore a binary file.
Removing the new lines between lines 41 & 45 and adding them with using Gedit has worked fine.
right.
i have no idea how that landed there. might have been some copy pasting from the web. i could understand if you say, that there are too many other things to fix. and a good fix would be probably some sort of binary diff or a diff showing all special characters (\n\r, tabs etc). both of which would be a lot of work.
It would be quite an overkill as it would be something very specific and it would require changing the internals of JGit (and even then, JGit behavior is intentional).
Unless it affects a lot of people, I'd mark it the issue as a "won't fix" and reopen it in case more users ask for it.
Describe the bug if a hunk contains changes to lines with slashes, staging that hunk works only partly. after staging, the diff view stops working. i can recover using git cola.
To Reproduce Steps to reproduce the behaviour:
Expected behavior the hunk or the lines are staged correctly, the diff view continues working
Screenshots![image](https://github.com/JetpackDuba/Gitnuro/assets/5292991/2f93a2a5-7f76-4f95-9cf8-1da7772d4da4)
Desktop (please complete the following information):