moshe-braner / SoftRF

:airplane: Multifunctional, compatible DIY general aviation proximity awareness system
GNU General Public License v3.0
18 stars 4 forks source link

line endings in source code #5

Closed moshe-braner closed 5 months ago

moshe-braner commented 2 years ago

My compilation setup is within Linux (using the Arduino IDE). Thought the line endings in source files should be Linux-standard (lf only). Turns out that Linar's source files have Windows line endings (cr-lf). The commits for the first version ended up replacing every line in every touched file, just due to the line endings. Thus github's "diff" feature won't show you exactly what I changed in the source. Sorry for that.

I fixed the line endings in the source files to fit Linar's for my second version. Github still won't show my changes, but you can run "diff" locally on your machine comparing my source files with Linar's (after you download both).

Tip: On Ubuntu 20.04 the default text editor silently preserves the line endings and you can't see what they are. On Windows, use the text editor "Notepad2". It is small, fast, free, will tell you what the line endings are, and you can easily change them. Or use Wordpad, it is smart enough to read files with any type line end, and if you save changes it silently converts to the Windows line ends.

Rant: I've been fighting this line-ending nonsense for 40 years and it's a huge waste of time. Why oh why isn't github's diff as smart as Wordpad?

rvt commented 1 year ago

You can tell git how to deal with lineendings : https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings