-
Notifications
You must be signed in to change notification settings - Fork 1k
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
NuGet updates convert csproj files from CRLF to LF #8642
Comments
Same issue here also in a private repo, I believe it started a few months ago. It might kind of go without saying, but this is on a Windows machine. If it helps, I also found this in the update logs:
With main checked out:
With a Dependabot branch checked out where line endings have been replaced:
Content of
Note that with either of the two branches above checked out, when I open the file in Notepad++, the line endings are always crlf (I remember reading that the Git client does some "magic" using Additionally:
|
I checked the repo for the message I'm seeing in logs and found it seems to be coming from here:
Checking the blame and ignoring a commit to fix a typo, this seems to have been introduced on 11/27/2023 in Normalize updated content after running NuGetUpdater fdde9bd. I did some poking around in our repo and found a PR opened by Dependabot on 11/25/2023 where the diff looked fine then another on 12/2/2023 where all the line endings were changed, which corresponds with the date of the commit above. Note that it's possible that the commit above isn't actually the cause of the problem, it might have just made an existing issue much more apparent (the commit above checks for mixed line endings and "fixes" them if necessary, but it's possible the line endings have been mixed for a long time and just weren't triggering something to change all line endings as a result). Edit: this looks like it might be closer to the root of the problem: |
Any update on this? It's still happening and it means I can't merge any dependabot PRs without considerable manual intervention. |
+1 |
Same issue on this repo since a few days ago: https://github.com/OpenRakis/Spice86 See this PR: OpenRakis/Spice86#779 |
It's completely unusable: The \r\n vs \n detection is broken. Note: I have a .gitattributes that enforces crlf on |
Is there an existing issue for this?
Package ecosystem
NuGet
Package manager version
No response
Language version
No response
Manifest location and content before the Dependabot update
https://github.com/adamralph/minver/blob/main/MinVer.Lib/MinVer.Lib.csproj
dependabot.yml content
https://github.com/adamralph/minver/blob/main/.github/dependabot.yml
Updated dependency
NuGet.Versioning from 6.7.0 to 6.8.0
What you expected to see, versus what you actually saw
Expected: Only the dependency updated, with line endings left the same.
Actual: The dependency updated, but all line endings change from CRLF to LF.
Native package manager behavior
Only the dependency update, with line endings left the same.
Images of the diff or a link to the PR, issue, or logs
https://github.com/adamralph/minver/pull/936/files
Smallest manifest that reproduces the issue
No response
The text was updated successfully, but these errors were encountered: