junichi11 / netbeans-change-lf

Change line endings on save.
https://plugins.netbeans.apache.org/catalogue/?id=31
Other
16 stars 3 forks source link

Retain current line endings #26

Closed davejbur closed 1 year ago

davejbur commented 1 year ago

I'm not sure if this is the correct location (it's probably more of a Netbeans thing?) but would it be possible to have a setting that says "keep whatever endings the file currently uses"?

My problem is that, when doing a mod on someone else's project, and I try to create a pull request, I find that the entire file is showing up as having changed, instead of the couple of lines I've actually changed. The reason turns out to be that the original file is saved with LF, but Netbeans has decided to save the file with CR-LF instead. Locally, I can ignore whitespace when doing comparisons, but when I create the pull request, Github seems to be unable to recognise the fact that changing the line endings is not a material change (so you could argue it is in fact a GH problem...!)

Yes, I could use this plugin to ensure I save the file with LF - but that means that, for each file I work on, I need to work out what the line ending is currently, and ensure I always save that file with that line ending! A default of "don't mess with the line endings at all" would be very helpful.

davejbur commented 1 year ago

Sorry, this is nothing to do with this plugin, it was a setting in GitHub...